Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp4534819rwb; Mon, 8 Aug 2022 02:46:48 -0700 (PDT) X-Google-Smtp-Source: AA6agR43rcvLxJTfNPBOQbF4j907++JKIioERLwly90JNegN4PsEt0296Pfis3WrNfGNlEllVHPw X-Received: by 2002:a17:90b:4c8c:b0:1f5:2214:a02f with SMTP id my12-20020a17090b4c8c00b001f52214a02fmr28729918pjb.66.1659952008529; Mon, 08 Aug 2022 02:46:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659952008; cv=none; d=google.com; s=arc-20160816; b=wIoyiIAGx25u76MkvDb6fQErQ9IdOIVU8GiWeXL0QdgPAEzMT1FQW1boonl3UJapJ+ qQZ0T03o5+DAQsPQim6B53r+Vqyq70rq8hWRn/X5/COAp1tpmi299r0ZfdqwS0GriDde nrUvE6f8XBXhz+/prdNk8xYh0JCM3hNt+Mj6cDku4thqEYEmUdblh0oOs/qpT0jKVePQ H1sp154VD4ZXnbVfVX2pySKftdwoiXP6VixnapXcYmhyVCT9w+TVwK5STvIM6QhQqqrM ipxMhHvMMrHiLFTd0/Szj/qSCAM0QiM7Ag+uDvJrYAcLzlejfLBUsJ8aOkZxIY+QRXGA 2IYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id:user-agent :references:in-reply-to:subject:cc:to:from:date:mime-version :dkim-signature; bh=FLcnkNMKZXlGTXCu3NwWYHqTu66R4FdjA0hPDVPaFdQ=; b=XV19irQM8Cbj8u/29D/LRIce+SIE7g5J9eLcBE8Do9qlG9rICONAb4q8wY9Mq3BMWE 2crjPD5vusvM3XTI5Cfkj1O2fOKRrAevsLqcY8CHUL9K/mu2Jxd+EGllYLfIgotnBlkT 3Jjy/9mixj0ACc7TAIrWiK9+3+WKIgmibETASUMTIjiY3Is+zsQF9MNON9A+oK26m/QA dzzsmAEBwq3PV6Cnsr96m+ONhzwY3JD3QW05jvdZxmFFFKDVGRDaOL6qHgaXyoTbP4wO rIrmznMAaTnoccQBs2fsDtyD9gbRggTpp+KbYynK6U/K5p5s9hGKL2TdBLkloXPonidW dhUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AEFQSJcQ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f13-20020a170902ce8d00b0016ca4b6f18fsi8250654plg.63.2022.08.08.02.46.33; Mon, 08 Aug 2022 02:46:48 -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=@kernel.org header.s=k20201202 header.b=AEFQSJcQ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241911AbiHHJFc (ORCPT + 99 others); Mon, 8 Aug 2022 05:05:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233880AbiHHJF3 (ORCPT ); Mon, 8 Aug 2022 05:05:29 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C0F85F7D for ; Mon, 8 Aug 2022 02:05:28 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id D5BB8B80E23 for ; Mon, 8 Aug 2022 09:05:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6C1B5C43470; Mon, 8 Aug 2022 09:05:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659949525; bh=D9qUF5UuvjzJ40cDcAJkTszFmP3h82udJTEW397VIfY=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=AEFQSJcQva6qpoaL+9U1uZPpXwiHelkldRIqOiHIXVyHK+ZiEWCTDgyQ3vNrbcitU O53vvosfnZ/iMfUeAzCsz/nuGG7p1DTYxKCGA5PsnKF4FhAC6KgDAKHuvhq7U57MNH zXQoQAzRZwhYoU+yJSE0OtXEOkdq2O+JmNsXx/iyse7iPr9cRI8jiFkmULlrZ9synO OmwKFv3j/ZIH2S8ym231ieOLE/X9+UvpQfY5H/2IG+8jnY5e2Jhp2fZU4jC4DhxWTp PobQ7l7f1KF93G7SLtLJ5+eWvnv164EpTOWwdyKEm66UJQSZk3h7UE5FVISMc14lqm vFq5DTCqsFiwA== Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1oKyhP-001ce3-5T; Mon, 08 Aug 2022 10:05:23 +0100 MIME-Version: 1.0 Date: Mon, 08 Aug 2022 10:05:23 +0100 From: Marc Zyngier To: Huacai Chen Cc: Thomas Gleixner , linux-kernel@vger.kernel.org, Xuefeng Li , Huacai Chen , Jiaxun Yang , kernel test robot Subject: Re: [PATCH] irqchip/loongson-pch-pic: Move find_pch_pic() into CONFIG_ACPI In-Reply-To: <20220808085359.3351574-1-chenhuacai@loongson.cn> References: <20220808085359.3351574-1-chenhuacai@loongson.cn> User-Agent: Roundcube Webmail/1.4.13 Message-ID: <61d4525e971206082096fd86525f1fcc@kernel.org> X-Sender: maz@kernel.org Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: chenhuacai@loongson.cn, tglx@linutronix.de, linux-kernel@vger.kernel.org, lixuefeng@loongson.cn, chenhuacai@gmail.com, jiaxun.yang@flygoat.com, lkp@intel.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 On 2022-08-08 09:53, Huacai Chen wrote: > MIPS doesn't declare find_pch_pic(), which makes a build warning: > >>> drivers/irqchip/irq-loongson-pch-pic.c:51:5: warning: no previous >>> prototype for function 'find_pch_pic' [-Wmissing-prototypes] > int find_pch_pic(u32 gsi) > ^ > drivers/irqchip/irq-loongson-pch-pic.c:51:1: note: declare 'static' > if the function is not intended to be used outside of this translation > unit > int find_pch_pic(u32 gsi) > ^ > static > 1 warning generated. > > Move find_pch_pic() into CONFIG_ACPI which only used by LoongArch to > fix > the warning. > > Reported-by: kernel test robot > Signed-off-by: Huacai Chen > --- > drivers/irqchip/irq-loongson-pch-pic.c | 38 +++++++++++++------------- > 1 file changed, 19 insertions(+), 19 deletions(-) > > diff --git a/drivers/irqchip/irq-loongson-pch-pic.c > b/drivers/irqchip/irq-loongson-pch-pic.c > index b6f1392964b1..b987b6517d59 100644 > --- a/drivers/irqchip/irq-loongson-pch-pic.c > +++ b/drivers/irqchip/irq-loongson-pch-pic.c > @@ -48,25 +48,6 @@ static struct pch_pic *pch_pic_priv[MAX_IO_PICS]; > > struct fwnode_handle *pch_pic_handle[MAX_IO_PICS]; > > -int find_pch_pic(u32 gsi) > -{ > - int i; > - > - /* Find the PCH_PIC that manages this GSI. */ > - for (i = 0; i < MAX_IO_PICS; i++) { > - struct pch_pic *priv = pch_pic_priv[i]; > - > - if (!priv) > - return -1; > - > - if (gsi >= priv->gsi_base && gsi < (priv->gsi_base + > priv->vec_count)) > - return i; > - } > - > - pr_err("ERROR: Unable to locate PCH_PIC for GSI %d\n", gsi); > - return -1; > -} > - > static void pch_pic_bitset(struct pch_pic *priv, int offset, int bit) > { > u32 reg; > @@ -325,6 +306,25 @@ IRQCHIP_DECLARE(pch_pic, "loongson,pch-pic-1.0", > pch_pic_of_init); > #endif > > #ifdef CONFIG_ACPI > +int find_pch_pic(u32 gsi) > +{ > + int i; > + > + /* Find the PCH_PIC that manages this GSI. */ > + for (i = 0; i < MAX_IO_PICS; i++) { > + struct pch_pic *priv = pch_pic_priv[i]; > + > + if (!priv) > + return -1; > + > + if (gsi >= priv->gsi_base && gsi < (priv->gsi_base + > priv->vec_count)) > + return i; > + } > + > + pr_err("ERROR: Unable to locate PCH_PIC for GSI %d\n", gsi); > + return -1; > +} > + > static int __init > pch_lpc_parse_madt(union acpi_subtable_headers *header, > const unsigned long end) While you're fixing this, can you also please fix this: $ git grep find_pch_pic arch/loongarch/include/asm/irq.h:extern int find_pch_pic(u32 gsi); arch/loongarch/include/asm/irq.h:int find_pch_pic(u32 gsi); Thanks, M. -- Jazz is not dead. It just smells funny...