* [PATCH]Silencing warning: 'host' may be used uninitialized in this function
@ 2009-04-09 22:33 Marin Mitov
2009-04-09 22:38 ` Jeff Garzik
0 siblings, 1 reply; 4+ messages in thread
From: Marin Mitov @ 2009-04-09 22:33 UTC (permalink / raw)
To: linux-kernel; +Cc: Jeff Garzik
Hi all,
I do not know if that is worth the effort, but...
Silencing: warning: 'host' may be used uninitialized in this function
It is a false positive.
The patch is against 2.6.30-rc1, but should apply to 2.6.29(.1) too.
Signed-off-by: Marin Mitov mitov@issp.bas.bg
================================================
--- a/drivers/ata/sata_via.c 2009-04-05 22:59:26.000000000 +0300
+++ b/drivers/ata/sata_via.c 2009-04-06 00:07:25.000000000 +0300
@@ -566,7 +566,7 @@
static int printed_version;
unsigned int i;
int rc;
- struct ata_host *host;
+ struct ata_host *host = host;
int board_id = (int) ent->driver_data;
const unsigned *bar_sizes;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH]Silencing warning: 'host' may be used uninitialized in this function
2009-04-09 22:33 [PATCH]Silencing warning: 'host' may be used uninitialized in this function Marin Mitov
@ 2009-04-09 22:38 ` Jeff Garzik
2009-04-09 23:31 ` Marin Mitov
0 siblings, 1 reply; 4+ messages in thread
From: Jeff Garzik @ 2009-04-09 22:38 UTC (permalink / raw)
To: Marin Mitov; +Cc: linux-kernel
Marin Mitov wrote:
> Hi all,
>
> I do not know if that is worth the effort, but...
>
> Silencing: warning: 'host' may be used uninitialized in this function
> It is a false positive.
>
> The patch is against 2.6.30-rc1, but should apply to 2.6.29(.1) too.
>
> Signed-off-by: Marin Mitov mitov@issp.bas.bg
> ================================================
> --- a/drivers/ata/sata_via.c 2009-04-05 22:59:26.000000000 +0300
> +++ b/drivers/ata/sata_via.c 2009-04-06 00:07:25.000000000 +0300
> @@ -566,7 +566,7 @@
> static int printed_version;
> unsigned int i;
> int rc;
> - struct ata_host *host;
> + struct ata_host *host = host;
> int board_id = (int) ent->driver_data;
> const unsigned *bar_sizes;
we use the uninitialized_var() macro for false positives.
Jeff
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH]Silencing warning: 'host' may be used uninitialized in this function
2009-04-09 22:38 ` Jeff Garzik
@ 2009-04-09 23:31 ` Marin Mitov
2009-04-13 8:11 ` Jeff Garzik
0 siblings, 1 reply; 4+ messages in thread
From: Marin Mitov @ 2009-04-09 23:31 UTC (permalink / raw)
To: Jeff Garzik; +Cc: linux-kernel
On Friday 10 April 2009 01:38:28 am Jeff Garzik wrote:
> Marin Mitov wrote:
> > Hi all,
> >
> > I do not know if that is worth the effort, but...
> >
> > Silencing: warning: 'host' may be used uninitialized in this function
> > It is a false positive.
> >
> > The patch is against 2.6.30-rc1, but should apply to 2.6.29(.1) too.
> >
> > Signed-off-by: Marin Mitov mitov@issp.bas.bg
> > ================================================
> > --- a/drivers/ata/sata_via.c 2009-04-05 22:59:26.000000000 +0300
> > +++ b/drivers/ata/sata_via.c 2009-04-06 00:07:25.000000000 +0300
> > @@ -566,7 +566,7 @@
> > static int printed_version;
> > unsigned int i;
> > int rc;
> > - struct ata_host *host;
> > + struct ata_host *host = host;
> > int board_id = (int) ent->driver_data;
> > const unsigned *bar_sizes;
>
> we use the uninitialized_var() macro for false positives.
>
> Jeff
>
Well, changed and resubmitted.
Marin Mitov
Silencing: " warning: 'host' may be used uninitialized in this function"
The patch is against 2.6.30-rc1, but should apply to 2.6.29(.1) too.
Signed-off-by: Marin Mitov mitov@issp.bas.bg
================================================
--- a/drivers/ata/sata_via.c 2009-04-05 22:59:26.000000000 +0300
+++ b/drivers/ata/sata_via.c 2009-04-06 00:07:25.000000000 +0300
@@ -566,7 +566,7 @@
static int printed_version;
unsigned int i;
int rc;
- struct ata_host *host;
+ struct ata_host *uninitialized_var(host);
int board_id = (int) ent->driver_data;
const unsigned *bar_sizes;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH]Silencing warning: 'host' may be used uninitialized in this function
2009-04-09 23:31 ` Marin Mitov
@ 2009-04-13 8:11 ` Jeff Garzik
0 siblings, 0 replies; 4+ messages in thread
From: Jeff Garzik @ 2009-04-13 8:11 UTC (permalink / raw)
To: Marin Mitov; +Cc: linux-kernel
Marin Mitov wrote:
> On Friday 10 April 2009 01:38:28 am Jeff Garzik wrote:
>> Marin Mitov wrote:
>>> Hi all,
>>>
>>> I do not know if that is worth the effort, but...
>>>
>>> Silencing: warning: 'host' may be used uninitialized in this function
>>> It is a false positive.
>>>
>>> The patch is against 2.6.30-rc1, but should apply to 2.6.29(.1) too.
>>>
>>> Signed-off-by: Marin Mitov mitov@issp.bas.bg
>>> ================================================
>>> --- a/drivers/ata/sata_via.c 2009-04-05 22:59:26.000000000 +0300
>>> +++ b/drivers/ata/sata_via.c 2009-04-06 00:07:25.000000000 +0300
>>> @@ -566,7 +566,7 @@
>>> static int printed_version;
>>> unsigned int i;
>>> int rc;
>>> - struct ata_host *host;
>>> + struct ata_host *host = host;
>>> int board_id = (int) ent->driver_data;
>>> const unsigned *bar_sizes;
>> we use the uninitialized_var() macro for false positives.
>>
>> Jeff
>>
>
> Well, changed and resubmitted.
>
> Marin Mitov
>
> Silencing: " warning: 'host' may be used uninitialized in this function"
>
> The patch is against 2.6.30-rc1, but should apply to 2.6.29(.1) too.
>
> Signed-off-by: Marin Mitov mitov@issp.bas.bg
> ================================================
> --- a/drivers/ata/sata_via.c 2009-04-05 22:59:26.000000000 +0300
> +++ b/drivers/ata/sata_via.c 2009-04-06 00:07:25.000000000 +0300
> @@ -566,7 +566,7 @@
> static int printed_version;
> unsigned int i;
> int rc;
> - struct ata_host *host;
> + struct ata_host *uninitialized_var(host);
> int board_id = (int) ent->driver_data;
> const unsigned *bar_sizes;
I did this a slightly different way... I went ahead and simply
initialized it.
Jeff
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-04-13 8:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-09 22:33 [PATCH]Silencing warning: 'host' may be used uninitialized in this function Marin Mitov
2009-04-09 22:38 ` Jeff Garzik
2009-04-09 23:31 ` Marin Mitov
2009-04-13 8:11 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).