From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752645AbbJPCqU (ORCPT ); Thu, 15 Oct 2015 22:46:20 -0400 Received: from mail-bl2on0121.outbound.protection.outlook.com ([65.55.169.121]:31648 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751380AbbJPCqR convert rfc822-to-8bit (ORCPT ); Thu, 15 Oct 2015 22:46:17 -0400 From: Yuantian Tang To: Tejun Heo , Arnd Bergmann CC: "linux-arm-kernel@lists.infradead.org" , "linux-ide@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "hdegoede@redhat.com" , "fengguang.wu@intel.com" Subject: RE: [PATCH] ahci: qoriq: Fix a compiling warning Thread-Topic: [PATCH] ahci: qoriq: Fix a compiling warning Thread-Index: AQHRBl3FOf3hXe6VfkuXuPeQPp5oep5squgAgAAGjwCAAAgOAIAAqcsg Date: Fri, 16 Oct 2015 02:12:45 +0000 Message-ID: References: <1444812412-33321-1-git-send-email-Yuantian.Tang@freescale.com> <20151015151152.GB27717@mtj.duckdns.org> <15555694.OtW6JZzsoS@wuerfel> <20151015160410.GC27717@mtj.duckdns.org> In-Reply-To: <20151015160410.GC27717@mtj.duckdns.org> Accept-Language: en-US, zh-CN Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Yuantian.Tang@freescale.com; x-originating-ip: [192.158.241.86] x-microsoft-exchange-diagnostics: 1;DM2PR03MB576;5:sNc+9zErko6S4YUeNASLDvRAv0uHmHl/0nlIYd8pEAU/tToIFXic0nOqPd4bGWPo9nvaHu/kO9iBiIZnAwtP5YxFpbd3BKua/Fv/Gp8bkbqCDm2GT9nY9S17+bXUC9j0XiUSaW58ppyrk/836MFjsA==;24:lJiRUHd2f2ee38mZInDpMxyOKynnKtUZKQqaTo5+kdZTBdYBr9HaowYaLpMdwxBfDk7YjbZCM4ion6U/h3l7+DBLYLLYzFqzf/xKrjAn/1A=;20:61e52ILMfAObC+MTnVU2GywnYbidMPE0GMtse5IkAdOHxdijrd1C0e9woqIYUdccl25EFRTyRjLpy63RfRr5UA== x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR03MB576; x-exchange-antispam-report-cfa: BCL:0;PCL:0;RULEID:;SRVR:DM2PR03MB576;BCL:0;PCL:0;RULEID:;SRVR:DM2PR03MB576; x-forefront-prvs: 0731AA2DE6 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(189002)(199003)(13464003)(377454003)(5008740100001)(10400500002)(101416001)(5001770100001)(81156007)(5004730100002)(5002640100001)(5003600100002)(19580405001)(189998001)(97736004)(99286002)(2950100001)(2900100001)(19580395003)(11100500001)(50986999)(106356001)(105586002)(93886004)(76176999)(76576001)(54356999)(106116001)(86362001)(64706001)(102836002)(46102003)(92566002)(77096005)(74316001)(87936001)(66066001)(40100003)(122556002)(33656002);DIR:OUT;SFP:1102;SCL:1;SRVR:DM2PR03MB576;H:DM2PR03MB574.namprd03.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Oct 2015 02:12:45.3354 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR03MB576 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks Tejun. Regards, Yuantian > -----Original Message----- > From: Tejun Heo [mailto:htejun@gmail.com] On Behalf Of Tejun Heo > Sent: Friday, October 16, 2015 12:04 AM > To: Arnd Bergmann > Cc: linux-arm-kernel@lists.infradead.org; Tang Yuantian-B29983 > ; linux-ide@vger.kernel.org; linux- > kernel@vger.kernel.org; hdegoede@redhat.com; fengguang.wu@intel.com > Subject: Re: [PATCH] ahci: qoriq: Fix a compiling warning > > Hello, > > I see. I applied the following to libata/for-4.4. > > Thanks. > > ------ 8< ------ > From eb351031a15c4a83b9955aadad783c6672ab8868 Mon Sep 17 00:00:00 > 2001 > From: Arnd Bergmann > Date: Wed, 14 Oct 2015 16:46:52 +0800 > Subject: [PATCH] ahci: qoriq: Fix a compiling warning > > kbuild test robot reports the warnings: > drivers/ata/ahci_qoriq.c: In function 'ahci_qoriq_hardreset': > >> include/asm-generic/io.h:163:2: warning: 'px_is' may be used > >> uninitialized in this function [-Wuninitialized] > drivers/ata/ahci_qoriq.c:70:14: note: 'px_is' was declared here > >> include/asm-generic/io.h:163:2: warning: 'px_cmd' may be used > >> uninitialized in this function [-Wuninitialized] > drivers/ata/ahci_qoriq.c:70:6: note: 'px_cmd' was declared here > > This patch fixed it by introducing a local variable. > > Signed-off-by: Arnd Bergmann > Signed-off-by: Tang Yuantian > Signed-off-by: Tejun Heo > --- > drivers/ata/ahci_qoriq.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/ata/ahci_qoriq.c b/drivers/ata/ahci_qoriq.c index > e5e4988..58c1a94 100644 > --- a/drivers/ata/ahci_qoriq.c > +++ b/drivers/ata/ahci_qoriq.c > @@ -76,6 +76,7 @@ static int ahci_qoriq_hardreset(struct ata_link *link, > unsigned int *class, > struct ata_taskfile tf; > bool online; > int rc; > + bool ls1021a_workaround = (qoriq_priv->type == AHCI_LS1021A); > > DPRINTK("ENTER\n"); > > @@ -92,7 +93,7 @@ static int ahci_qoriq_hardreset(struct ata_link *link, > unsigned int *class, > * After the sequence is complete, software should restore the > * PxCMD and PxIS with the stored values. > */ > - if (qoriq_priv->type == AHCI_LS1021A) { > + if (ls1021a_workaround) { > px_cmd = readl(port_mmio + PORT_CMD); > px_is = readl(port_mmio + PORT_IRQ_STAT); > } > @@ -106,7 +107,7 @@ static int ahci_qoriq_hardreset(struct ata_link *link, > unsigned int *class, > ahci_check_ready); > > /* restore the PxCMD and PxIS on ls1021 */ > - if (qoriq_priv->type == AHCI_LS1021A) { > + if (ls1021a_workaround) { > px_val = readl(port_mmio + PORT_CMD); > if (px_val != px_cmd) > writel(px_cmd, port_mmio + PORT_CMD); > -- > 2.4.3