From: Simon Que Date: Thu, 17 Jan 2013 00:07:52 +0000 (-0800) Subject: CHROMIUM: ata: libata-core: initialize native_sectors in ata_hpa_resize() X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=b3b4dc7104f744ee5707e1ae51329bd58888d18c;p=people%2Faperard%2Flinux-chromebook.git CHROMIUM: ata: libata-core: initialize native_sectors in ata_hpa_resize() Eliminates a compiler warning about uninitialized variable: "warning: 'native_sectors' may be used uninitialized in this function" This has been submitted for review upstream, but not yet accepted. BUG=chromium-os:5542 TEST=emerge chromeos-kernel, make sure the warning doesn't appear Change-Id: Ic791f8053c468e74445e07a306c76cd9e9e5494b Signed-off-by: Simon Que Reviewed-on: https://gerrit.chromium.org/gerrit/41948 Reviewed-by: Mandeep Singh Baines --- diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 9d153d7a6a461..fa42d6b063908 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -1322,7 +1322,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? */