From patchwork Thu Oct 15 16:04:10 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tejun Heo X-Patchwork-Id: 7407531 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9BDE49F4DC for ; Thu, 15 Oct 2015 16:06:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C302D20768 for ; Thu, 15 Oct 2015 16:06:16 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E1CAD2073C for ; Thu, 15 Oct 2015 16:06:15 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zml1A-0008Ko-ST; Thu, 15 Oct 2015 16:04:36 +0000 Received: from mail-yk0-x22d.google.com ([2607:f8b0:4002:c07::22d]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zml17-00082t-Ky for linux-arm-kernel@lists.infradead.org; Thu, 15 Oct 2015 16:04:34 +0000 Received: by ykdt21 with SMTP id t21so21933256ykd.3 for ; Thu, 15 Oct 2015 09:04:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=YFZgJ4ewNrVkZoWIXc6KbQT5k9YGkFVE0Zqg2BjsRfs=; b=XluDAGsqzE9YSrf32AgG7DmgkA3Fi01DCkknZr8YXyktjlCc/xsdKGf0vGdGgBCYZY OfIwdN08s3OtOw6JI7aKbbFZBm2qkWexsMaEwoEbJ4yMfiFmQXaujn9E8Sv6wDSwX1UX SJGn3y8vN1iERfjySfW34PTXx+TxPNldoX3XMXA/OxQlNlNq1CCEENf6+2bfBqIIcVKW 2UW86MusWA9JpslQBG8DT2j2eprpQGU83j/KKgBzXVHsJGGEzWYk7RHaHfh1qpBNdedb 3aWWNHaix+8sWpmuGr6TCsmch36SddNC5PdGklPHuW86lxImJjtdDha63rDkhAiAMFIX LyWQ== X-Received: by 10.129.89.66 with SMTP id n63mr7231834ywb.286.1444925052633; Thu, 15 Oct 2015 09:04:12 -0700 (PDT) Received: from mtj.duckdns.org ([2620:10d:c091:200::4:15be]) by smtp.gmail.com with ESMTPSA id p4sm10788984ywb.41.2015.10.15.09.04.11 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Oct 2015 09:04:12 -0700 (PDT) Date: Thu, 15 Oct 2015 12:04:10 -0400 From: Tejun Heo To: Arnd Bergmann Subject: Re: [PATCH] ahci: qoriq: Fix a compiling warning Message-ID: <20151015160410.GC27717@mtj.duckdns.org> References: <1444812412-33321-1-git-send-email-Yuantian.Tang@freescale.com> <20151015151152.GB27717@mtj.duckdns.org> <15555694.OtW6JZzsoS@wuerfel> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <15555694.OtW6JZzsoS@wuerfel> User-Agent: Mutt/1.5.24 (2015-08-30) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151015_090433_752417_5859179B X-CRM114-Status: GOOD ( 14.99 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-ide@vger.kernel.org, hdegoede@redhat.com, linux-kernel@vger.kernel.org, Tang Yuantian , fengguang.wu@intel.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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);