From nobody Sun Feb 8 19:59:49 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+106919+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+106919+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1689268033; cv=none; d=zohomail.com; s=zohoarc; b=BazBDEgnidDVr5nf5D70k/YQdEaRWSfwRwMRHSGGHIhudzv/NPZ597+Mqxf1w/TP0D4qyYiYQ59rNXHAPOHtDk3hMp4B5jX6XTE07YBDdvFivPqBgnREbdD7TXSdS78gpdSHMalHRajJ8DfEATkevpUrNyunBKMbmPPt+Y/afnw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1689268033; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=8O0paxyl/6YzcsPkX7YhPdxGfHbEFaZ1H+gBAyAd1gA=; b=GbFF8E2DBhy+Vi0Itaxo2sc4MZbAxxRsohYKrDxii3phYh3D6b//cprLnn6s/MwbScC16ksyiQqSBbIFCTWMmvySt81YyCusPxGOEeELD6P/+zDeOIj/cuA7hk0Varr7rECm/cEJjinnoDmjArnVFCFT5u3NzVX7QxiPXhD97x8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+106919+1787277+3901457@groups.io Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1689268033005380.771520572486; Thu, 13 Jul 2023 10:07:13 -0700 (PDT) Return-Path: DKIM-Signature: a=rsa-sha256; bh=pVeWhC66fTUKhuvcSZUNwXtGslhUbtX9GeLdZKFy8vA=; c=relaxed/simple; d=groups.io; h=X-Received:X-Received:X-Received:X-Gm-Message-State:X-Google-Smtp-Source:X-Received:X-Received:From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Unsubscribe:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:Content-Transfer-Encoding; s=20140610; t=1689268032; v=1; b=J8jL8BUc0OLiw1rP/tHJnFB98i7OFIoaVMG9MvQ2dbl4u5o8NqW7QofJ+IH3zvyyhXtNKVIK N+KlzLRvI8PsY3n7919BuCHJeiP92Iw5pg+wWMFh4EUhGOv7r7ME6JG9Q8ynW8D2R+YJnTydook M0EDYwoZo8x8Dvj8q3xRLAmQ= X-Received: by 127.0.0.2 with SMTP id s6JuYY1788612xShJFdXLy2b; Thu, 13 Jul 2023 10:07:12 -0700 X-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 X-Received: by mail-pf1-f182.google.com with SMTP id d2e1a72fcca58-66869feb7d1so641236b3a.3 for ; Thu, 13 Jul 2023 09:47:25 -0700 (PDT) X-Gm-Message-State: osTe3kRTkkZg8dDk26dj8oM6x1787277AA= 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) X-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: [edk2-devel] [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> In-Reply-To: <20230713164715.1734745-1-rsingh@ventanamicro.com> References: <20230713164715.1734745-1-rsingh@ventanamicro.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,rsingh@ventanamicro.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1689268033569100004 Content-Type: text/plain; charset="utf-8" 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 ( // if (DeviceType =3D=3D EfiIdeHarddisk) { // - // Init driver parameters + // Init drive parameters // DriveParameters.Sector =3D (UINT8)((ATA5_IDENTIFY_DATA *)(&B= uffer.AtaData))->sectors_per_track; DriveParameters.Heads =3D (UINT8)(((ATA5_IDENTIFY_DATA *)(&= Buffer.AtaData))->heads - 1); DriveParameters.MultipleSector =3D (UINT8)((ATA5_IDENTIFY_DATA *)(&B= uffer.AtaData))->multi_sector_cmd_max_sct_cnt; =20 Status =3D SetDriveParameters (Instance, IdeChannel, IdeDevice, &Dri= veParameters, NULL); + + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_WARN, "Set Drive Parameters Fail, Status =3D %r\n", = Status)); + // + // Ignore warning and proceed normally + // + Status =3D EFI_SUCCESS; + } } =20 // --=20 2.34.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#106919): https://edk2.groups.io/g/devel/message/106919 Mute This Topic: https://groups.io/mt/100124817/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-