From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) by mx.groups.io with SMTP id smtpd.web11.1838.1689266846001078721 for ; Thu, 13 Jul 2023 09:47:26 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@ventanamicro.com header.s=google header.b=dhPtXlfN; spf=pass (domain: ventanamicro.com, ip: 209.85.210.182, mailfrom: rsingh@ventanamicro.com) Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-66869feb7d1so641236b3a.3 for ; Thu, 13 Jul 2023 09:47:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1689266845; x=1691858845; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4ynJqzhQvY1TYT9sIAcLCbt2VzNSu+q18okKwG2fRaQ=; b=dhPtXlfN1/JZT5Q3QwDj5ejhE0RvOaM1Ofen7gTIFXqKRCzU/Wg+SSwLFA/dAUzgPi lWfcWTRORxxB/qa4KYCfAv1CUXnyfEwCCgHWY9+BNp3eavJ7GSQBEZUizlsjeu/o7REQ 1quzLeURmaK6S4KaKYf/u5GdNtFeQ7Zfd1vd1X4RgL/mB0/twq0x8XeiA0zS2Q+fjhIV 7NpsNyxmpXT8V3AaKUTH2Udjniywmi2DSDWwl+pFK+WeptX0LfWCbXQxosV2EKw4sacV u694gXvLWASx/njedRJgRLkt0kmbBYM0Qj0jEWCnZUXOMh/zXmBsxSCh7NDcnXTExF1L 84Hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689266845; x=1691858845; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4ynJqzhQvY1TYT9sIAcLCbt2VzNSu+q18okKwG2fRaQ=; b=UtHLgy6khoMi09vJOoRLC/2LwRlHPK/MtRx8BaAUFK5o6oPgYbmSvrk8L6lp9UkEbF 5h51EWf6cPK1GY4XKHG5/hte0+lnbTwBRerc+IJmJUpRL8IV46/qeeS43u4KLQlOfOkh /gWi5MgEYPLbtCSvgx2MIbbF2jBsS4rCREH2X2mFQbgcTN+ATXd6dbFdNwk5psRYiDVj /L/oX72tvxQ5FHq2SikOqfjJDSaRlNvfWkKeu/4yV1/BUSeEcT7JHsSZTBJMWRVG27UT FwG0w3NJDwA3nuU1+s0OZ10u6F7nHthlpDYHV8aHW2lOPAolYClUvfVmu4wQeHuY08rR b0Pg== X-Gm-Message-State: ABy/qLZJsXtWliwUfTRekVq+ZOzk82uS2tlaXvR35LfNbdXJ1unJkP/6 +CYdTOtIo3B4a/vOid/g8/MNi14v44BOwO12Mo8= X-Google-Smtp-Source: APBJJlHNj0xkaqDYNxawyD4z9tRzEKD25zRGHi+g3nqAOtWN2AGmNcu1r2GSaS089wSad6DrLClFew== X-Received: by 2002:a17:902:d485:b0:1b1:9802:a31b with SMTP id c5-20020a170902d48500b001b19802a31bmr1568947plg.41.1689266845311; Thu, 13 Jul 2023 09:47:25 -0700 (PDT) Return-Path: Received: from user-Latitude-5420.dc1.ventanamicro.com ([2401:4900:1cbd:8dd2:35e7:16dd:8a1f:72c5]) by smtp.gmail.com with ESMTPSA id x13-20020a170902b40d00b001b8c3c7b102sm6190320plr.127.2023.07.13.09.47.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jul 2023 09:47:25 -0700 (PDT) From: Ranbir Singh To: devel@edk2.groups.io, rsingh@ventanamicro.com Cc: Hao A Wu , Ray Ni Subject: [PATCH v3 2/2] MdeModulePkg/Bus/Ata/AtaAtapiPassThru: Fix UNUSED_VALUE Coverity issue Date: Thu, 13 Jul 2023 22:17:15 +0530 Message-Id: <20230713164715.1734745-3-rsingh@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230713164715.1734745-1-rsingh@ventanamicro.com> References: <20230713164715.1734745-1-rsingh@ventanamicro.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Ranbir Singh The return value stored in Status after call to SetDriveParameters is not made of any use thereafter and hence it remains as UNUSED. Add error check as is done after calls to SetDeviceTransferMode. Cc: Hao A Wu Cc: Ray Ni REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4204 Signed-off-by: Ranbir Singh Signed-off-by: Ranbir Singh --- MdeModulePkg/Bus/Ata/AtaAtapiPassThru/IdeMode.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/IdeMode.c b/MdeModulePkg= /Bus/Ata/AtaAtapiPassThru/IdeMode.c index 75403886e44a..af022139cf02 100644 --- a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/IdeMode.c +++ b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/IdeMode.c @@ -2549,13 +2549,21 @@ DetectAndConfigIdeDevice ( //=0D if (DeviceType =3D=3D EfiIdeHarddisk) {=0D //=0D - // Init driver parameters=0D + // Init drive parameters=0D //=0D DriveParameters.Sector =3D (UINT8)((ATA5_IDENTIFY_DATA *)(&B= uffer.AtaData))->sectors_per_track;=0D DriveParameters.Heads =3D (UINT8)(((ATA5_IDENTIFY_DATA *)(&= Buffer.AtaData))->heads - 1);=0D DriveParameters.MultipleSector =3D (UINT8)((ATA5_IDENTIFY_DATA *)(&B= uffer.AtaData))->multi_sector_cmd_max_sct_cnt;=0D =0D Status =3D SetDriveParameters (Instance, IdeChannel, IdeDevice, &Dri= veParameters, NULL);=0D +=0D + if (EFI_ERROR (Status)) {=0D + DEBUG ((DEBUG_WARN, "Set Drive Parameters Fail, Status =3D %r\n", = Status));=0D + //=0D + // Ignore warning and proceed normally=0D + //=0D + Status =3D EFI_SUCCESS;=0D + }=0D }=0D =0D //=0D --=20 2.34.1