Re: [PATCH] qla2xxx: Fix for build warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Anirban,

On Mon, 10 Nov 2008 12:26:23 -0800 (PST) Anirban Chakraborty <anirban.chakraborty@xxxxxxxxxx> wrote:
>
> 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,
> Anirban
> 
> Signed-off-by: Anirban Chakraborty <anirban.chakraborty@xxxxxxxxxx>
> 
> ---
>  drivers/scsi/qla2xxx/qla_os.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
> index 05db166..9aa24a4 100644
> --- a/drivers/scsi/qla2xxx/qla_os.c
> +++ b/drivers/scsi/qla2xxx/qla_os.c
> @@ -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.

-- 
Cheers,
Stephen Rothwell                    sfr@xxxxxxxxxxxxxxxx
http://www.canb.auug.org.au/~sfr/

Attachment: pgpPjcg0pMBt3.pgp
Description: PGP signature


[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux