Linux ATA/IDE development
 help / color / mirror / Atom feed
* [PATCH v3] ata: libata-core: initialize native_sectors in ata_hpa_resize()
@ 2013-01-24 19:57 Simon Que
  2013-01-25 11:21 ` Sergei Shtylyov
  0 siblings, 1 reply; 4+ messages in thread
From: Simon Que @ 2013-01-24 19:57 UTC (permalink / raw)
  To: sshtylyov, linux-ide; +Cc: msb, Simon Que

Eliminates a compiler warning about uninitialized variable.
"warning: 'native_sectors' may be used uninitialized in this function"

Signed-off-by: Simon Que <sque@chromium.org>
---
 drivers/ata/libata-core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index d2b18ea..b185db1 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -1324,7 +1324,7 @@ static int ata_hpa_resize(struct ata_device *dev)
 	int print_info = ehc->i.flags & ATA_EHI_PRINTINFO;
 	bool unlock_hpa = ata_ignore_hpa || dev->flags & ATA_DFLAG_UNLOCK_HPA;
 	u64 sectors = ata_id_n_sectors(dev->id);
-	u64 native_sectors;
+	u64 native_sectors = 0;
 	int rc;
 
 	/* do we need to do it? */
-- 
1.7.8.6


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-01-28 20:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-24 19:57 [PATCH v3] ata: libata-core: initialize native_sectors in ata_hpa_resize() Simon Que
2013-01-25 11:21 ` Sergei Shtylyov
2013-01-25 23:31   ` Simon Que
2013-01-28 20:39     ` Simon Que

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox