From: Sergei Shtylyov <sshtylyov@mvista.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: Tejun Heo <tj@kernel.org>, Jeff Garzik <jgarzik@redhat.com>,
Fang Wenqi <anton.fang@gmail.com>,
linux-ide@vger.kernel.org, Alan Cox <alan@lxorguk.ukuu.org.uk>,
antonf@turbolinux.com.cn
Subject: Re: [PATCH] drivers/ata/libata-eh.c: fix unused variable warning
Date: Fri, 23 Apr 2010 18:07:24 +0400 [thread overview]
Message-ID: <4BD1A99C.8010803@ru.mvista.com> (raw)
In-Reply-To: <4BD1A62E.5070602@garzik.org>
Hello.
Jeff Garzik wrote:
>>>>> Sorry that the title should be:
>>>>> "fix uninitialized variable warning"
>>>>>
>>>>> not
>>>>> "fix unused variable warning"
>>>>>
>>>>> Need I re-send the patch mail ?
>>>>
>>>> Yes, please do so. gcc 4.4.1 generates a spurious warning on it too.
>>>>
>>>> Acked-by: Tejun Heo<tj@kernel.org>
>>>
>>> It's not a spurious warning. The code failed to fully initialize all
>>> fields of the ata_taskfile structure, prior to copying the ata_taskfile
>>> structure into qc->result_tf.
>>
>> Hmmmm.... right, I've always thought it was gcc not noticing the
>> structure is being initialized in ata_eh_read_log_10h() but it
>> actually is noticing much more, so something like the following is
>> more appropriate?
>>
>> Subject: libata: fully initialize @tf in ata_eh_read_log_10h()
>>
>> ata_eh_read_log_10h() filled @tf only partially. It didn't cause any
>> correctness issues but triggered spruious uninitialized variable
>> warning. Do ata_tf_init() before filling in @tf.
>>
>> Signed-off-by: Tejun Heo<tj@kernel.org>
>
> Sorry, I should have also pointed out that a fix went upstream to
> Linus in the last batch of fixes...
I thought Tejun was fixing a different function, no?
> Jeff
MBR, Sergei
next prev parent reply other threads:[~2010-04-23 14:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-21 14:07 [PATCH] drivers/ata/libata-eh.c: fix unused variable warning Fang Wenqi
2010-04-21 14:24 ` Alan Cox
2010-04-21 14:57 ` Fang Wenqi
2010-04-22 1:23 ` Fang Wenqi
2010-04-23 6:30 ` Tejun Heo
2010-04-23 6:43 ` Jeff Garzik
2010-04-23 7:01 ` Tejun Heo
2010-04-23 13:52 ` Jeff Garzik
2010-04-23 14:02 ` Tejun Heo
2010-04-23 14:07 ` Sergei Shtylyov [this message]
2010-04-23 14:18 ` Jeff Garzik
2010-04-23 6:48 ` Fang Wenqi
2010-04-23 1:54 ` Jeff Garzik
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=4BD1A99C.8010803@ru.mvista.com \
--to=sshtylyov@mvista.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=anton.fang@gmail.com \
--cc=antonf@turbolinux.com.cn \
--cc=jeff@garzik.org \
--cc=jgarzik@redhat.com \
--cc=linux-ide@vger.kernel.org \
--cc=tj@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.