From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yb1-f201.google.com (mail-yb1-f201.google.com [209.85.219.201]) by mx.groups.io with SMTP id smtpd.web10.11150.1674033249028343398 for ; Wed, 18 Jan 2023 01:14:09 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@google.com header.s=20210112 header.b=R9ICZrOh; spf=pass (domain: flex--yuanyu.bounces.google.com, ip: 209.85.219.201, mailfrom: 3yljhywykbrujfv8jf19916z.x97yzgz6zy5n.1c9fad.39@flex--yuanyu.bounces.google.com) Received: by mail-yb1-f201.google.com with SMTP id k204-20020a256fd5000000b007b8b040bc50so34916457ybc.1 for ; Wed, 18 Jan 2023 01:14:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=jDya0hMFK2uRwvBtI5uwIIs9ZSHofvLhjP2v/YMPPRQ=; b=R9ICZrOhEjYc1pzShHGqAfN6h0Xj0wFSATT0bOGucu+9+wmPOz9FhUo+H/gEQyEZRV 4yxor3t93IVf9377Wsn2lBhtJcfwhU2SGeyuw9+5llAC6Eaub4vD1y5r6Nqx1cUdBRzj AONZ0H1vTZ/DWdvrpy1aVqDbStv/EwRGGPI0FDPh4tku9Px6gN2EBa3WDEr6StTsQJjO xUSjotNNETsoEvDeF3euHnuBbc/aZmK2VIEO0Sznxl1J10UKFd2JDyEVDPEUGDEIPoG/ qFvv/pUQ+jD5OvVEz//rxQVNu6wMKAi6wUmcYCivwdb1bVlcChvRLCi8j+O7oBH33Or4 sV6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=jDya0hMFK2uRwvBtI5uwIIs9ZSHofvLhjP2v/YMPPRQ=; b=yhjFVyO3L3dPnrST28H3pe+DA5EC7RK2JkWQK8ar/TsbsX8SKQNgph9coLjrzi3sK/ dbWulHCip8wZr9NTwzak5OQHnd5Jqhz77fXKvcXMan5gorJesZnJweYT5zackhzFV2jI /wGsvpmNthZDQ0j2/WdVDFJVYblVmp/N07yvKT73TOV7qLIw1/svJU9eezJwwIgEqdsB FoKjW+4g+AnFhaXpSNc1ohhdHoACRj4S6oa7K8YyNCkK4LNY5FI/rTxm2+bh6lu4yeIA POUtHgjoITYS/zhcJCnBQ0g5/wSNvYdpujMdilPOrtVR+Pr5Ddhp5B3Jlpwiw1MSMwsN TC+g== X-Gm-Message-State: AFqh2kq/jDG3xf8+oDP6FwtlImg7Z90geJQfkaNQjxzXObxH/PN9eaYA KWcAkJSt2zPnIo7h6y6+Rin87HGRCRSwucDSdwX9ZkERuL7qB3QLGjWoRS9Vz/Y5et9LJ5e+LBi gVhNgqN17CQN4VfNuEoj5p1iRPc31BAeW6Tn3O4mmA+jetqF6YVX530fF1QU= X-Google-Smtp-Source: AMrXdXsZgqFMu2+Qe/rz1uSTCiMeGSQolE7wDHbD40yyI/M6I0cfg8u5dL82WNlmpuUykdIWdGAtOPiM4QE= X-Received: from yuanyu.kir.corp.google.com ([2620:15c:29:204:1cbf:6a8c:60ac:298c]) (user=yuanyu job=sendgmr) by 2002:a0d:f584:0:b0:4dd:35c1:f523 with SMTP id e126-20020a0df584000000b004dd35c1f523mr741719ywf.431.1674033248114; Wed, 18 Jan 2023 01:14:08 -0800 (PST) Date: Wed, 18 Jan 2023 01:14:02 -0800 In-Reply-To: <20230118091402.931498-1-yuanyu@google.com> Mime-Version: 1.0 References: <20230118091402.931498-1-yuanyu@google.com> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog Message-ID: <20230118091402.931498-3-yuanyu@google.com> Subject: [PATCH v1 2/2] MdeModulePkg: Clean up unused Status. From: "Yuan Yu" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Liming Gao , Hao A Wu , Ray Ni , Sivaparvathi chellaiah Content-Type: text/plain; charset="UTF-8" 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 Cc: Liming Gao Cc: Hao A Wu Cc: Ray Ni Cc: Sivaparvathi chellaiah Signed-off-by: Yuan Yu --- 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