From patchwork Thu Dec 20 14:10:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dirk Behme X-Patchwork-Id: 207669 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id C28AF2C007E for ; Fri, 21 Dec 2012 01:18:42 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750983Ab2LTOSl (ORCPT ); Thu, 20 Dec 2012 09:18:41 -0500 Received: from mail-bk0-f50.google.com ([209.85.214.50]:36944 "EHLO mail-bk0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750796Ab2LTOSl (ORCPT ); Thu, 20 Dec 2012 09:18:41 -0500 X-Greylist: delayed 475 seconds by postgrey-1.27 at vger.kernel.org; Thu, 20 Dec 2012 09:18:40 EST Received: by mail-bk0-f50.google.com with SMTP id jf3so1711085bkc.37 for ; Thu, 20 Dec 2012 06:18:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=Jv42DhnLZGYKzBqicPmTBXh+6yMbiZuXFu/Vlxcdr4Y=; b=u4jCcy059FTEYt3PrK08UGTNdLdTP1z5AcxbTSWmBUH7xZotxqlrMNqqamG0rmaR65 TYth9DcxzrVO5/2wgNUvVQo8JCenAGJU4z2vQzobDnWeFbVdNpDkyvGmtsCyjIOU98tu GlsyaPzWTMBnbhMCyNL0mfmTjP2AxYwPOhRUpTFPZWU42MBOpsMdN7LPwOlbRX7hApqR i6ReBM4gEL105KXNvL24ocU4IEd1+v+Fl0qxPBqxG5W89sI4kklo/KuS0X5z6xyOHVmR NMuCLKeG+wtlf4VkJGE0VPBZzLx/CwenqlEtFtRzd08NWUolBO84ARxp6hIz2ShI+kol 5BoA== X-Received: by 10.204.3.220 with SMTP id 28mr4566410bko.50.1356012644526; Thu, 20 Dec 2012 06:10:44 -0800 (PST) Received: from localhost.localdomain (p4FEE381D.dip.t-dialin.net. [79.238.56.29]) by mx.google.com with ESMTPS id o7sm7258790bkv.13.2012.12.20.06.10.42 (version=SSLv3 cipher=OTHER); Thu, 20 Dec 2012 06:10:43 -0800 (PST) From: Dirk Behme To: linux-ide@vger.kernel.org Cc: Dirk Behme , Jeff Garzik Subject: [PATCH] libata-core: disable uninitialized var warning Date: Thu, 20 Dec 2012 15:10:38 +0100 Message-Id: <1356012638-4942-1-git-send-email-dirk.behme@gmail.com> X-Mailer: git-send-email 1.7.10.4 Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org Make GCC happy by disabling the warning drivers/ata/libata-core.c: In function 'ata_hpa_resize': drivers/ata/libata-core.c:1394:3: warning: 'native_sectors' may be used uninitialized in this function [-Wmaybe-uninitialized] Looking on the code, 'native_sectors' is always initialized by calling ata_read_native_max_address(dev, &native_sectors). Signed-off-by: Dirk Behme CC: Jeff Garzik --- drivers/ata/libata-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 9e8b99a..21623cf 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 /* GCC */; int rc; /* do we need to do it? */