[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 08/19] mptsas: avoid shadowed local variables
From: |
Paolo Bonzini |
Subject: |
[PULL 08/19] mptsas: avoid shadowed local variables |
Date: |
Tue, 26 Sep 2023 18:59:04 +0200 |
Rename the argument so that "addr" is only used inside the for loop.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/scsi/mptsas.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/scsi/mptsas.c b/hw/scsi/mptsas.c
index 3de288b454c..75d3ab8bd18 100644
--- a/hw/scsi/mptsas.c
+++ b/hw/scsi/mptsas.c
@@ -192,7 +192,7 @@ static dma_addr_t mptsas_ld_sg_base(MPTSASState *s,
uint32_t flags_and_length,
return addr;
}
-static int mptsas_build_sgl(MPTSASState *s, MPTSASRequest *req, hwaddr addr)
+static int mptsas_build_sgl(MPTSASState *s, MPTSASRequest *req, hwaddr
req_addr)
{
PCIDevice *pci = (PCIDevice *) s;
hwaddr next_chain_addr;
@@ -201,8 +201,8 @@ static int mptsas_build_sgl(MPTSASState *s, MPTSASRequest
*req, hwaddr addr)
uint32_t chain_offset;
chain_offset = req->scsi_io.ChainOffset;
- next_chain_addr = addr + chain_offset * sizeof(uint32_t);
- sgaddr = addr + sizeof(MPIMsgSCSIIORequest);
+ next_chain_addr = req_addr + chain_offset * sizeof(uint32_t);
+ sgaddr = req_addr + sizeof(MPIMsgSCSIIORequest);
pci_dma_sglist_init(&req->qsg, pci, 4);
left = req->scsi_io.DataLength;
--
2.41.0
- [PULL 00/19] Misc patches for 2023-09-26, Paolo Bonzini, 2023/09/26
- [PULL 01/19] pc_piix: remove pc-i440fx-1.4 up to pc-i440fx-1.7, Paolo Bonzini, 2023/09/26
- [PULL 03/19] user-exec-stub: remove unused variable, Paolo Bonzini, 2023/09/26
- [PULL 04/19] hw/scsi/scsi-disk: Disallow block sizes smaller than 512 [CVE-2023-42467], Paolo Bonzini, 2023/09/26
- [PULL 07/19] ui/vnc: fix handling of VNC_FEATURE_XVP, Paolo Bonzini, 2023/09/26
- [PULL 06/19] ui/vnc: fix debug output for invalid audio message, Paolo Bonzini, 2023/09/26
- [PULL 12/19] target/i386/cpu: avoid shadowed local variables, Paolo Bonzini, 2023/09/26
- [PULL 08/19] mptsas: avoid shadowed local variables,
Paolo Bonzini <=
- [PULL 10/19] m48t59-test: avoid possible overflow on ABS, Paolo Bonzini, 2023/09/26
- [PULL 17/19] block: mark mixed functions that can suspend, Paolo Bonzini, 2023/09/26
- [PULL 14/19] target/i386/seg_helper: introduce tss_set_busy, Paolo Bonzini, 2023/09/26
- [PULL 02/19] seabios: remove PCI drivers from bios.bin, Paolo Bonzini, 2023/09/26
- [PULL 15/19] target/i386/seg_helper: remove shadowed variable, Paolo Bonzini, 2023/09/26
- [PULL 05/19] vl: remove shadowed local variables, Paolo Bonzini, 2023/09/26
- [PULL 13/19] target/i386/translate: avoid shadowed local variables, Paolo Bonzini, 2023/09/26
- [PULL 11/19] target/i386/kvm: eliminate shadowed local variables, Paolo Bonzini, 2023/09/26
- [PULL 09/19] pm_smbus: rename variable to avoid shadowing, Paolo Bonzini, 2023/09/26
- [PULL 19/19] audio: remove shadowed locals, Paolo Bonzini, 2023/09/26