Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp509124pxx; Mon, 26 Oct 2020 13:46:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw2DfBwSVTyt7Gab3FvPaNKAZd4Y6UClgb3h1vIGp1FtGDJrtKNmcghf7vOtMhrdaJ8uaDV X-Received: by 2002:a17:906:8385:: with SMTP id p5mr17135784ejx.538.1603745212442; Mon, 26 Oct 2020 13:46:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603745212; cv=none; d=google.com; s=arc-20160816; b=R77/sKeiX1DxBHEAMaltalxB5bFh+oVfL/xoA+JazUQuV+YdqKLl5V6EnLRsuCmZKN iivPH/7J+C8sE+Fnmg+YOmGPa+/yYmr0GynDn0N+ZkPQV9FpKMVlL9aaM56VhfHiYr+Q 9SBMvBXt8mhD3pH17Gy1Atu01RHBc/NCkruonJgGyGe1BwKl2j+/7lAsLmrM5Tx1pknD trwqwUr3/cOYfT0zIRIM83zClr1Ys42OabY9rz/MqvQH06AATcTt9WcgwSJhkvGzoMrA Mp7uCiW5MIUCG6n58jCQYsiCk8eVxqM0Ztlt6B2iL9FUzXxNFJCSUWAFFwI7BlXoGi/b /jhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=vp3Wv3WC8GHO4BkwlWETZJjijKkKXBK5BboN3IUSfUU=; b=oWzZ7P5nusGCi1uEyHrHvZbzn2G/ZnhnSnn2ezZdSF1RxorA3Gb3PU1vLrkID3GERg qCzT65iTicdweqp+IkzbxbVHQpixW/wcU2Tf6m3k1HnD5HddJsCn3gjLPXA9ugo7A1nV G9D/ULcHKiBfAxWN7+1pBVi2zQxwrGYtCi6lFWEBmBm1SXQ+IpdcdX7JUFiaq7ckj7Lj tVZRpJTKXeyURdIb9BUT+1KpfBAsCz9Zk037JAN8FsXSCOx06M1hDIwnZ8YPXyEraEfr NHNJMK4YVmgRkf/KgU3ZDn9y7kA/DSGJ6tzG0iUpAFYSPDYP1k2QYIHGMfIF3gUN/UZc /A0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LXg4jZYq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x27si7245774ejf.95.2020.10.26.13.46.04; Mon, 26 Oct 2020 13:46:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LXg4jZYq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1783986AbgJZPx7 (ORCPT + 99 others); Mon, 26 Oct 2020 11:53:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:43090 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1771082AbgJZPx7 (ORCPT ); Mon, 26 Oct 2020 11:53:59 -0400 Received: from localhost.localdomain (unknown [192.30.34.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 37F9D22400; Mon, 26 Oct 2020 15:53:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603727639; bh=5IVVcrxpYydxJgmqENGuC00vj7m3t2LxF6vYxRp4r2w=; h=From:To:Cc:Subject:Date:From; b=LXg4jZYqyajpFhZgg/Tuy3Yn4HUDSaJSVKwCDTWrPZIY/+539jPBsjz86NtslNLr/ qNWfEjM8MnulgkUQFO3gh+nwLrpthClYHYlICjnMPCsowEK+Vco42eMddbndZXQ2m+ Tn5u/6CZ1HzxlEfxz6Pus4Ly+U2xuem4QofC/JPg= From: Arnd Bergmann To: Arnd Bergmann Cc: Dennis Zhou , Christoph Lameter , Luc Van Oostenryck , linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] asm-generic: percpu: avoid Wshadow warning Date: Mon, 26 Oct 2020 16:53:48 +0100 Message-Id: <20201026155353.3702892-1-arnd@kernel.org> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann Nesting macros that use the same local variable names causes warnings when building with "make W=2": include/asm-generic/percpu.h:117:14: warning: declaration of '__ret' shadows a previous local [-Wshadow] include/asm-generic/percpu.h:126:14: warning: declaration of '__ret' shadows a previous local [-Wshadow] These are fairly harmless, but since the warning comes from a global header, the warning happens every time the headers are included, which is fairly annoying. Rename the variables to avoid shadowing and shut up the warning. Signed-off-by: Arnd Bergmann --- include/asm-generic/percpu.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/include/asm-generic/percpu.h b/include/asm-generic/percpu.h index 35e4a53b83e6..6432a7fade91 100644 --- a/include/asm-generic/percpu.h +++ b/include/asm-generic/percpu.h @@ -114,21 +114,21 @@ do { \ #define __this_cpu_generic_read_nopreempt(pcp) \ ({ \ - typeof(pcp) __ret; \ + typeof(pcp) ___ret; \ preempt_disable_notrace(); \ - __ret = READ_ONCE(*raw_cpu_ptr(&(pcp))); \ + ___ret = READ_ONCE(*raw_cpu_ptr(&(pcp))); \ preempt_enable_notrace(); \ - __ret; \ + ___ret; \ }) #define __this_cpu_generic_read_noirq(pcp) \ ({ \ - typeof(pcp) __ret; \ - unsigned long __flags; \ - raw_local_irq_save(__flags); \ - __ret = raw_cpu_generic_read(pcp); \ - raw_local_irq_restore(__flags); \ - __ret; \ + typeof(pcp) ___ret; \ + unsigned long ___flags; \ + raw_local_irq_save(___flags); \ + ___ret = raw_cpu_generic_read(pcp); \ + raw_local_irq_restore(___flags); \ + ___ret; \ }) #define this_cpu_generic_read(pcp) \ -- 2.27.0