public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Yuan Yu" <yuanyu@google.com>
To: devel@edk2.groups.io
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>,
	Liming Gao <gaoliming@byosoft.com.cn>,
	 Hao A Wu <hao.a.wu@intel.com>, Ray Ni <ray.ni@intel.com>,
	 Sivaparvathi chellaiah <sivaparvathic@ami.com>
Subject: [PATCH v1 2/2] MdeModulePkg: Clean up unused Status.
Date: Wed, 18 Jan 2023 01:14:02 -0800	[thread overview]
Message-ID: <20230118091402.931498-3-yuanyu@google.com> (raw)
In-Reply-To: <20230118091402.931498-1-yuanyu@google.com>

Logically, the while loop that contains ScsiScanCreateDevice() should
continue regardless what the returned Status is, because the purpose of
the while loop is to scan all possible Puns in the SCSI channel.

Without this fix, some static analyzer may complain about the unused
return value.

Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Hao A Wu <hao.a.wu@intel.com>
Cc: Ray Ni <ray.ni@intel.com>
Cc: Sivaparvathi chellaiah <sivaparvathic@ami.com>

Signed-off-by: Yuan Yu <yuanyu@google.com>
---
 MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c
index 2ed816da4abe..7f133253a256 100644
--- a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c
+++ b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c
@@ -532,7 +532,7 @@ SCSIBusDriverBindingStart (
     // Scan for the scsi device, if it attaches to the scsi bus,
     // then create handle and install scsi i/o protocol.
     //
-    Status = ScsiScanCreateDevice (This, Controller, &ScsiTargetId, Lun, ScsiBusDev);
+    ScsiScanCreateDevice (This, Controller, &ScsiTargetId, Lun, ScsiBusDev);
   }
 
   return EFI_SUCCESS;
-- 
2.39.0.314.g84b9a713c41-goog


      parent reply	other threads:[~2023-01-18  9:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-18  9:14 [PATCH v1 0/2] Fix boot failure caused by loop abortion Yuan Yu
2023-01-18  9:14 ` [PATCH v1 1/2] MdeModulePkg: Fix bug in ScsiBusDxe/ScsiBus.c Yuan Yu
2023-01-19  6:32   ` Wu, Hao A
2023-01-31  6:06     ` Yuan Yu
2023-01-18  9:14 ` Yuan Yu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230118091402.931498-3-yuanyu@google.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox