Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp145421imn; Fri, 29 Jul 2022 02:35:35 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uVCQpwMelbYyDMbUJ3oVaNuBCciFqhn+9tV5roLap4SbaJkERIa7E4tLyXa8CV3hLnnidY X-Received: by 2002:a05:6a00:3498:b0:52a:f8f4:ca7c with SMTP id cp24-20020a056a00349800b0052af8f4ca7cmr2636538pfb.5.1659087335008; Fri, 29 Jul 2022 02:35:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659087335; cv=none; d=google.com; s=arc-20160816; b=vrKKRW8l2quf45N9z8fb/Pk1Uwfqd844UK4sGdu267E1OpHHZvnePIO/ka202hFfKm T/K8XkN/HTws+g7lf5syJ9Uuzw1BQRvF41jPTzvFnRSk6G77Qc9EZYTy4x1VskSTDs5l VcvKNkoiSsERDog8roqX1GtE9FqeKQsGuFdsoMpYV3Pr5A2xSF7VHKmT+vgxIvdMJEAF WMsvcIItYPpv0VWdF73wfeBfiVQZJtiAYxvdsD23CATrvutslil1eJgeEIowNYl1Wfwn yrxXWIheZocLViQTsCyJwoT+khpmzXjOX45QQeMQYMKo7oa2nhU6R1XeSjzC8Gz62gWj oL7g== 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:sender:dkim-signature; bh=0F6WjsWKz9KObz/7ifzY4OgIObfiPVIJwTipmY0aiBw=; b=godCXxvXEOcuhjN2aQkztqtCA03NQWJt+zdF+RDsQmKgZY8f5bKbkYSM6CsbPumU4a lJ0ZQy0wQ8wT9caSkvX9qfdjSjVq/sipHBpojbj77N75yEZAAUnLCalPyZjhxx5Tlr3n s9ualZBDVi+mXGY0Pj0eh38TvyKLgpWp4CW/KV9avs1+P3WJfunbzwU2kSB3XJmxz0Bq H40isZ9J5rLVs6v/QcEJM4HQ4j8JvmsihW5tMRSA17VxHwtD/Ocln0hIKuIDli/+d/RJ q87CMgyINv5mbsghtnYKIvBRNEeFjxnjhE4mIqWhR/3Kj4eo8r17yej4Z6RCzASx4JlR 7cNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=qmwdmJu0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k188-20020a6284c5000000b005256c98d7adsi3088121pfd.27.2022.07.29.02.35.18; Fri, 29 Jul 2022 02:35:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=qmwdmJu0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235316AbiG2JDY (ORCPT + 99 others); Fri, 29 Jul 2022 05:03:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38910 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235242AbiG2JDW (ORCPT ); Fri, 29 Jul 2022 05:03:22 -0400 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 322A81FCC7 for ; Fri, 29 Jul 2022 02:03:21 -0700 (PDT) Received: by mail-pj1-x1030.google.com with SMTP id w17-20020a17090a8a1100b001f326c73df6so3014353pjn.3 for ; Fri, 29 Jul 2022 02:03:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=0F6WjsWKz9KObz/7ifzY4OgIObfiPVIJwTipmY0aiBw=; b=qmwdmJu0l8LfCg+XkzBuR7nx6MbzD26HflPamW2qkwNLU7BYiC6T5XjBDiEy8cejfM xuaMQNAcGU15/ccma9ZQx7GT94YcpBcuRD7h9V4qL11ZFIj84Ks9O0+3sl3nS1RzoOY8 gbHoPomjbTRpJWHSRu2OVb6f3pGiPr9yzVeaJ5h9YxNwPzxFvyX2H7ZcNTCjXlCj1t52 +w5vJ2bZP9cGkWFz+Oe+3R2I+jYPNl2koSj33AQwZGLLOjHher4xTpfK7oBNwU2mzsQ3 FONb6LxZf64oYDzOeEfMXpIH0TYEFm5L7cRJkXQwIcfPww1fgHZ7iDDC7PEyLfafAMr4 fa7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=0F6WjsWKz9KObz/7ifzY4OgIObfiPVIJwTipmY0aiBw=; b=B+79M5VntO7ZlBCS0Sv5YhsVJMOoJFIHFBiDVMkSoaI22hT5AWJ030CTZW3j9CnO/w sOZ1hFdL8YOIi574eSkpzlLUTkX3OCvpl/3qYx0WtrTJhWmK7ejbXHen9rk6m0DH6Xhq X9VX1aAUsGS+VkeUZNsE3hPAanUll2Lbl0VB/zxvKnD3uvJ0g44VwV9onhLSnGg1TlOq uBa/6LXQarhFtQgHNrMH9Dj5Ofqa4pWWk/vcQoCvy9rhf6wF6NTB68F03Ae8GZclh05v +fpxvWS0CMBVkc/svzw7/SwUCoAQzaS8StWOr2XPKP0/DKj4Y8MgG5KSy5oFrjlxN0dB n25A== X-Gm-Message-State: ACgBeo1ONtDxvFigE/3RdnVom1kv9PsBcRb/LXhmlpUgjznqV1ML5fl3 JenbaPKS2hVzEw74l53aHdCs4PKcQlETfw== X-Received: by 2002:a17:902:ab90:b0:16d:c280:3c27 with SMTP id f16-20020a170902ab9000b0016dc2803c27mr2871998plr.58.1659085400632; Fri, 29 Jul 2022 02:03:20 -0700 (PDT) Received: from localhost.localdomain (124x33x176x97.ap124.ftth.ucom.ne.jp. [124.33.176.97]) by smtp.gmail.com with ESMTPSA id x66-20020a628645000000b0052ab3039c4esm2319740pfd.8.2022.07.29.02.03.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jul 2022 02:03:20 -0700 (PDT) Sender: Vincent Mailhol From: Vincent Mailhol To: Marc Zyngier , linux-kernel@vger.kernel.org Cc: Vincent Mailhol Subject: [PATCH] irqdomain: do not shadow nr_irqs global definition Date: Fri, 29 Jul 2022 18:03:07 +0900 Message-Id: <20220729090307.57905-1-mailhol.vincent@wanadoo.fr> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org include/linux/irqnr.h declares a global variable named `nr_irqs'. The inline function irq_domain_alloc_irqs() from include/linux/irqdomain.h also uses the same name and thus shadow the global declaration. Rename the function argument from `nr_irqs' to `nbr_irqs'. This patch silences below -Wshadow warning: | In file included from ./arch/x86/include/asm/irqdomain.h:5, | from ./arch/x86/include/asm/msi.h:5, | from ./include/linux/msi.h:23, | from ./include/linux/kvm_host.h:19, | from arch/x86/kernel/../kvm/vmx/vmx.h:5, | from arch/x86/kernel/asm-offsets.c:22: | ./include/linux/irqdomain.h: In function 'irq_domain_alloc_irqs': | ./include/linux/irqdomain.h:514:38: warning: declaration of 'nr_irqs' shadows a global declaration [-Wshadow] | 514 | unsigned int nr_irqs, int node, void *arg) | | ~~~~~~~~~~~~~^~~~~~~ | In file included from ./include/linux/interrupt.h:10, | from ./include/linux/kernel_stat.h:9, | from ./include/linux/cgroup.h:26, | from ./include/linux/memcontrol.h:13, | from ./include/linux/swap.h:9, | from ./include/linux/suspend.h:5, | from arch/x86/kernel/asm-offsets.c:13: | ./include/linux/irqnr.h:8:12: note: shadowed declaration is here | 8 | extern int nr_irqs; | | ^~~~~~~ Signed-off-by: Vincent Mailhol --- include/linux/irqdomain.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index 00d577f90883..76949bb029b0 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h @@ -511,9 +511,9 @@ extern int irq_domain_activate_irq(struct irq_data *irq_data, bool early); extern void irq_domain_deactivate_irq(struct irq_data *irq_data); static inline int irq_domain_alloc_irqs(struct irq_domain *domain, - unsigned int nr_irqs, int node, void *arg) + unsigned int nbr_irqs, int node, void *arg) { - return __irq_domain_alloc_irqs(domain, -1, nr_irqs, node, arg, false, + return __irq_domain_alloc_irqs(domain, -1, nbr_irqs, node, arg, false, NULL); } -- 2.35.1