Linux ATA/IDE development
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Subrata Modak <subrata@linux.vnet.ibm.com>
Cc: Sachin P Sant <sachinp@linux.vnet.ibm.com>,
	linux-ide@vger.kernel.org,
	Balbir Singh <balbir@linux.vnet.ibm.com>
Subject: Re: [PATCH] Fix Trivial Warnining in drivers/ata/libata-scsi.c
Date: Mon, 27 Apr 2009 08:03:30 -0400	[thread overview]
Message-ID: <49F59F12.3040904@pobox.com> (raw)
In-Reply-To: <20090427103124.6941.55106.sendpatchset@subratamodak.linux.ibm.com>

Subrata Modak wrote:
> Hi Jeff,
> 
> I observed the following warning for drivers/ata/libata-scsi.c:
> 
> drivers/ata/libata-scsi.c: In function ‘ata_scsi_scan_host’:
> drivers/ata/libata-scsi.c:3272: warning: ‘dev’ may be used uninitialized in this function
> ---
> 
> In most instances=>
> 	struct ata_device *dev
> has been initialized except the above instance. My trivial patch below fixes this.
> Please include it if you like it.
> 
> To: Jeff Garzik <jgarzik@pobox.com>
> Cc: linux-ide@vger.kernel.org
> Cc: Balbir Singh <balbir@linux.vnet.ibm.com>
> Cc: Sachin P Sant <sachinp@linux.vnet.ibm.com>
> Signed-Off-By: Subrata Modak <subrata@linux.vnet.ibm.com>
> ---
> 
> --- a/drivers/ata/libata-scsi.c	2009-04-27 11:39:27.000000000 +0530
> +++ b/drivers/ata/libata-scsi.c	2009-04-27 15:52:17.000000000 +0530
> @@ -3269,7 +3269,7 @@ void ata_scsi_scan_host(struct ata_port 
>  	int tries = 5;
>  	struct ata_device *last_failed_dev = NULL;
>  	struct ata_link *link;
> -	struct ata_device *dev;
> +	struct ata_device *dev = NULL;
>  
>  	if (ap->flags & ATA_FLAG_DISABLED)

What was the conclusion of the analysis?  :)

Is this a kernel bug, or gcc bug?

	Jeff





  reply	other threads:[~2009-04-27 12:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-27 10:31 [PATCH] Fix Trivial Warnining in drivers/ata/libata-scsi.c Subrata Modak
2009-04-27 12:03 ` Jeff Garzik [this message]
2009-04-27 13:01   ` Subrata Modak

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-all 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=49F59F12.3040904@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=sachinp@linux.vnet.ibm.com \
    --cc=subrata@linux.vnet.ibm.com \
    /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