qla2xxx: Fix for build warning
Subsystems (3)
PATCH 1/1 qla2xxx: Fix for build warning
In reply to a message not in the archiveHere is the patch that takes care of the build warning due to a missing initializer for a local variable in qla probe function. Please apply.
Thanks,
Anirban
--- drivers/scsi/qla2xxx/qla_os.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/scsi/qla2xxx/qla_os.c +1 -1
@@ -1563,7 +1563,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)char pci_info[30 ];char fw_str[30 ];struct scsi_host_template *sht; -int bars, mem_only, max_id =0 ; +int bars, mem_only =0 , max_id =0 ;uint16_t req_length =0 , rsp_length =0 ; bars =pci_select_bars (pdev,IORESOURCE_MEM |IORESOURCE_IO );
Hi Anirban,
Quoted 19 lines · On Mon, 10 Nov 2008 12:26:23 -0800 (PST) Anirban Chakraborty…
Here is the patch that takes care of the build warning due to a missing initializer for a local variable in qla probe function. Please apply.
Thanks,
AnirbanSigned-off-by Anirban Chakraborty <[email protected]>--- drivers/scsi/qla2xxx/qla_os.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/scsi/qla2xxx/qla_os.c +0
-0
drivers/scsi/qla2xxx/qla_os.c qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) · line 1566
Quoted 5 lines
drivers/scsi/qla2xxx/qla_os.c +1
-1@@ -1563,7 +1563,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)char pci_info[30 ];char fw_str[30 ];struct scsi_host_template *sht; -int bars, mem_only, max_id =0 ; +int bars, mem_only =0 , max_id =0 ;
Except that max_id does not need to be initialised (its is assigned unconditionally before being used). I suspect what happened is that in the origin patch, the ", max_id" was inserted before the " = 0" instead of after it.
Signature · 3 lines
Cheers, Stephen Rothwell [email protected] http://www.canb.auug.org.au/~sfr/
Thanks Stephen for pointing it out. The updated patch goes here.
Thanks,
Anirban
--- drivers/scsi/qla2xxx/qla_os.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/scsi/qla2xxx/qla_os.c +1 -1
@@ -1563,7 +1563,7 @@ qla2x00_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)char pci_info[30 ];char fw_str[30 ];struct scsi_host_template *sht; -int bars, mem_only, max_id =0 ; +int bars, max_id, mem_only =0 ;uint16_t req_length =0 , rsp_length =0 ; bars =pci_select_bars (pdev,IORESOURCE_MEM |IORESOURCE_IO );