Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2019398rwl; Sat, 8 Apr 2023 06:25:14 -0700 (PDT) X-Google-Smtp-Source: AKy350a8142KZltk/G55hkrNnWMtiGEVII/0ftOzQFkCwBadBviQDsugRkBTwNdWKxlPvAgP1B55 X-Received: by 2002:a17:906:5652:b0:933:4ca3:9678 with SMTP id v18-20020a170906565200b009334ca39678mr2687813ejr.24.1680960314634; Sat, 08 Apr 2023 06:25:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680960314; cv=none; d=google.com; s=arc-20160816; b=0perP1vqnnFIShiaAq7X215EqRDggQFvRj3YfOuCzLYsQ7wDDH0l2deRIb266yTmXW VursCNCBMX6Geisp0e479MhBm9V4hkXIafcNDO3pq/7+yPiiW/JpXegJnJ4OOl3xqRKE x84vMhNqQlvi53PGd/5knJUtRpOY4sRZTb5MT+Ph3/N53fli0oVGHUP8VnRn8ViYxJgY tsh/UTkyOmi+Pjf2yka0GBjh3/JgtDM52pev55O/AaC92S5meSKC+XMWp8gyPTmPsBIZ h2A4RSw4OxH9y4P+AepAnGk9MBcv4CFqvJlPSkzQLUyJrOvjLu3nykvdKin4FeNYOCEW JdQg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ntnbAotwLtwwGVrGHEADUfrX10d4hUlZ/L5z/Hb5rOU=; b=Fefhg9VLjaUM8glMxGi6CumThAP3dgaJVULkUaxIdnjsU42KCyLYNVtZW6FOlvOaU4 66PPNaKD5jc+e2DXDTcXfEhzag2qXiIbYDhbqCVA9BNIXhakoEUNOQeA2hgRtx8uHxfk qHH/++ZzvhqSGRPuBMGhkqotAwyXk+t9jZCQhJ9bDAaSWzLY6yG5EdNvC3kPk5wuB9vS 7GxbsmXdAyEL1EUllurHmpfPo3j3t2hL+CpYdRId5Olv9StC9TkKbn7Itg01NHFeP75c 6NWBAB3WSL1AADZz1YYOsYTFUvYTyvNArtDykekPjjBITXuvBceQC6UcFK48V9SD516A 51gA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RtVJ3N1Q; 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 dn2-20020a17090794c200b0094a5893e2e4si47038ejc.139.2023.04.08.06.24.50; Sat, 08 Apr 2023 06:25:14 -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=RtVJ3N1Q; 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 S229732AbjDHNYP (ORCPT + 99 others); Sat, 8 Apr 2023 09:24:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229902AbjDHNYK (ORCPT ); Sat, 8 Apr 2023 09:24:10 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A410D530 for ; Sat, 8 Apr 2023 06:24:09 -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 dfw.source.kernel.org (Postfix) with ESMTPS id E9AA9614B5 for ; Sat, 8 Apr 2023 13:24:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 06657C4339B; Sat, 8 Apr 2023 13:24:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680960248; bh=iTZ6SSSkmkUrttYgTeEY1olkDBnV1oJ/1z4G62lZrhE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RtVJ3N1QacMSiqLD+DPMteaEk8x2Yv6vvuMkONEQomWnEmNOTcjXKAT6iXfX7ULVW JfHDM7Ayfhoz/0aMgPIYk+UTspKf4X6VKgNEDUrmY9c6kFnbDwWGPNxdNydRXEcdDK bGc0QfUYbtZVpPciBwDsZnUgig08PAI3HE8eCQCH4FoSkOZiaraKQWw4hjtc2A6mXP U6vQvcmKQFI4z+Q12HOYzT1/tE/yIinD1z/zLJTWp/uE/gGJ6fI75XeckhK25stT8e 5MUdbS2st6NUuqsoMmc/fqHl8LE3NyPe/mS3vvQblNxFcYvgx4twWQUCXKpjxEvlWp CjNLiSKd5ra3g== Received: by pali.im (Postfix) id 458661BE4; Sat, 8 Apr 2023 15:24:05 +0200 (CEST) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Michael Ellerman , Christophe Leroy , Nicholas Piggin Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/8] powerpc/fsl_uli1575: Misc cleanup Date: Sat, 8 Apr 2023 15:21:44 +0200 Message-Id: <20230408132151.8902-2-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230408132151.8902-1-pali@kernel.org> References: <20230408132151.8902-1-pali@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable 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 From: Christophe Leroy Use a single line for uli_exclude_device(). Add uli_exclude_device() prototype in ppc-pci.h and guard it. Remove that prototype from mpc85xx_ds.c and mpc86xx_hpcn.c files. Make uli_pirq_to_irq[] static as it is used only in that file. Signed-off-by: Christophe Leroy Signed-off-by: Pali Rohár --- arch/powerpc/include/asm/ppc-pci.h | 8 ++++++++ arch/powerpc/platforms/85xx/mpc85xx_ds.c | 4 +--- arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 4 +--- arch/powerpc/platforms/fsl_uli1575.c | 6 +++--- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/arch/powerpc/include/asm/ppc-pci.h b/arch/powerpc/include/asm/ppc-pci.h index f6cf0159024e..56ba9ec68fcd 100644 --- a/arch/powerpc/include/asm/ppc-pci.h +++ b/arch/powerpc/include/asm/ppc-pci.h @@ -57,11 +57,19 @@ void eeh_sysfs_remove_device(struct pci_dev *pdev); #endif /* CONFIG_EEH */ +#ifdef CONFIG_FSL_ULI1575 +int uli_exclude_device(struct pci_controller *hose, u_char bus, u_char devfn); +#endif /* CONFIG_FSL_ULI1575 */ + #define PCI_BUSNO(bdfn) ((bdfn >> 8) & 0xff) #else /* CONFIG_PCI */ static inline void init_pci_config_tokens(void) { } #endif /* !CONFIG_PCI */ +#if !defined(CONFIG_PCI) || !defined(CONFIG_FSL_ULI1575) +static inline int uli_exclude_device(struct pci_controller *hose, u_char bus, u_char devfn) { return PCIBIOS_SUCCESSFUL; } +#endif /* !defined(CONFIG_PCI) || !defined(CONFIG_FSL_ULI1575) */ + #endif /* __KERNEL__ */ #endif /* _ASM_POWERPC_PPC_PCI_H */ diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c index 70167b8f00a3..ed7b71d55b10 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -107,9 +108,6 @@ void __init mpc85xx_ds_pic_init(void) } #ifdef CONFIG_PCI -extern int uli_exclude_device(struct pci_controller *hose, - u_char bus, u_char devfn); - static struct device_node *pci_with_uli; static int mpc85xx_exclude_device(struct pci_controller *hose, diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c index 7b00ebd2d7f8..3dbd396a0df5 100644 --- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c +++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c @@ -22,6 +22,7 @@ #include #include #include +#include #include @@ -39,9 +40,6 @@ #endif #ifdef CONFIG_PCI -extern int uli_exclude_device(struct pci_controller *hose, - u_char bus, u_char devfn); - static int mpc86xx_exclude_device(struct pci_controller *hose, u_char bus, u_char devfn) { diff --git a/arch/powerpc/platforms/fsl_uli1575.c b/arch/powerpc/platforms/fsl_uli1575.c index 84afae7a2561..a32f9cef7845 100644 --- a/arch/powerpc/platforms/fsl_uli1575.c +++ b/arch/powerpc/platforms/fsl_uli1575.c @@ -13,6 +13,7 @@ #include #include +#include #define ULI_PIRQA 0x08 #define ULI_PIRQB 0x09 @@ -36,7 +37,7 @@ #define ULI_8259_IRQ14 0x0d #define ULI_8259_IRQ15 0x0f -u8 uli_pirq_to_irq[8] = { +static u8 uli_pirq_to_irq[8] = { ULI_8259_IRQ9, /* PIRQA */ ULI_8259_IRQ10, /* PIRQB */ ULI_8259_IRQ11, /* PIRQC */ @@ -341,8 +342,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5288, hpcd_quirk_uli5288); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5229, hpcd_quirk_uli5229); DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, 0x5288, hpcd_final_uli5288); -int uli_exclude_device(struct pci_controller *hose, - u_char bus, u_char devfn) +int uli_exclude_device(struct pci_controller *hose, u_char bus, u_char devfn) { if (bus == (hose->first_busno + 2)) { /* exclude Modem controller */ -- 2.20.1