From patchwork Mon May 18 11:10:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 6428021 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 F1FF69F1C1 for ; Mon, 18 May 2015 11:13:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 193AB205C1 for ; Mon, 18 May 2015 11:13:49 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 27871205BE for ; Mon, 18 May 2015 11:13:48 +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 1YuIx8-00037v-4t; Mon, 18 May 2015 11:11:22 +0000 Received: from mail-wg0-f50.google.com ([74.125.82.50]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YuIx4-00032t-U3 for linux-arm-kernel@lists.infradead.org; Mon, 18 May 2015 11:11:20 +0000 Received: by wgjc11 with SMTP id c11so22388730wgj.0 for ; Mon, 18 May 2015 04:10:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=ubCKPwv1stoVtVqzW7mD8Bo4TL9X+huEbaZMvh9iMsk=; b=gjcB3IZQKKY8w/HMvgc6GjFNuuPjb7/mgUqwTQdy4/b96NhGyQJ/P1fUqMbEllhwjr IkFrzPAEl8NZo3mDr0zUfgzRrFQIDMzZQfZ9L2iO5DGY5b82AELptJkApZmVVnbq0574 /pVb9hUREohcwuMC+q/WMrXH/kpAsXzytpht1Xfy4qKnUwxzc79obbFPu9i5OU+mW7lA Uu5dkalz05+dZfEk7atgyyZmduf6Dz2WGPntALpvwUBfK4ldwHxQ91/dCQLQni8JQyxM MroHMmfUi6A5E8NvLJ8Fqax+0MH9C+ZLYhkHSIRhx8XLq0yRvyCa0KCgtMa5DNku4AqE CL7w== X-Gm-Message-State: ALoCoQluzR5/nHdTlQz8MKrMIVtugV1nrZP5QT6cm01TN6Z9SsYY317NCoCIc3MvPor7yKWStdv+ X-Received: by 10.180.83.6 with SMTP id m6mr21054950wiy.72.1431947454418; Mon, 18 May 2015 04:10:54 -0700 (PDT) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by mx.google.com with ESMTPSA id n8sm11927766wiy.19.2015.05.18.04.10.53 (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Mon, 18 May 2015 04:10:53 -0700 (PDT) From: Michal Simek To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] arm64: Rename temp variable in read*_relaxed() Date: Mon, 18 May 2015 13:10:48 +0200 Message-Id: <4f9792c7d10ca30a9b6ba5e2860b56814a41309c.1431947444.git.michal.simek@xilinx.com> X-Mailer: git-send-email 2.3.5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150518_041119_112920_B168EFCE X-CRM114-Status: GOOD ( 10.30 ) X-Spam-Score: -0.7 (/) Cc: Mark Rutland , Min-Hua Chen , Andre Przywara , Liviu Dudau , linux-kernel@vger.kernel.org, Will Deacon , Bjorn Helgaas , Catalin Marinas , Olof Johansson , Thierry Reding X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 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.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 This resolves the following sparse warning from readl() and other macros, which ends up embedding readl_relaxed() using the same variable. Warning log: include/asm-generic/io.h:364:16: warning: symbol '__v' shadows an earlier one include/asm-generic/io.h:364:16: originally declared here include/asm-generic/io.h:372:16: warning: symbol '__v' shadows an earlier one include/asm-generic/io.h:372:16: originally declared here include/asm-generic/io.h:380:16: warning: symbol '__v' shadows an earlier one include/asm-generic/io.h:380:16: originally declared here include/asm-generic/io.h:568:16: warning: symbol '__v' shadows an earlier one include/asm-generic/io.h:568:16: originally declared here include/asm-generic/io.h:576:16: warning: symbol '__v' shadows an earlier one include/asm-generic/io.h:576:16: originally declared here include/asm-generic/io.h:584:16: warning: symbol '__v' shadows an earlier one include/asm-generic/io.h:584:16: originally declared here The same patch was already applied to arm32 as "ARM: 7118/1: rename temp variable in read*_relaxed()" (sha1: b0c1264f534a1cb3c52036a23a04d238434a0df6) Signed-off-by: Michal Simek Acked-by: Liviu Dudau --- arch/arm64/include/asm/io.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm64/include/asm/io.h b/arch/arm64/include/asm/io.h index 540f7c0aea82..cb18715cc60f 100644 --- a/arch/arm64/include/asm/io.h +++ b/arch/arm64/include/asm/io.h @@ -117,10 +117,10 @@ static inline u64 __raw_readq(const volatile void __iomem *addr) * ordering rules but do not guarantee any ordering relative to Normal memory * accesses. */ -#define readb_relaxed(c) ({ u8 __v = __raw_readb(c); __v; }) -#define readw_relaxed(c) ({ u16 __v = le16_to_cpu((__force __le16)__raw_readw(c)); __v; }) -#define readl_relaxed(c) ({ u32 __v = le32_to_cpu((__force __le32)__raw_readl(c)); __v; }) -#define readq_relaxed(c) ({ u64 __v = le64_to_cpu((__force __le64)__raw_readq(c)); __v; }) +#define readb_relaxed(c) ({ u8 __r = __raw_readb(c); __r; }) +#define readw_relaxed(c) ({ u16 __r = le16_to_cpu((__force __le16)__raw_readw(c)); __r; }) +#define readl_relaxed(c) ({ u32 __r = le32_to_cpu((__force __le32)__raw_readl(c)); __r; }) +#define readq_relaxed(c) ({ u64 __r = le64_to_cpu((__force __le64)__raw_readq(c)); __r; }) #define writeb_relaxed(v,c) ((void)__raw_writeb((v),(c))) #define writew_relaxed(v,c) ((void)__raw_writew((__force u16)cpu_to_le16(v),(c)))