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@xxxxxxxxxx>
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@xxxxxxxxxx>
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
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html