From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5DE72C433FE for ; Thu, 28 Apr 2022 13:36:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347345AbiD1NjQ (ORCPT ); Thu, 28 Apr 2022 09:39:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347441AbiD1NjF (ORCPT ); Thu, 28 Apr 2022 09:39:05 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 831F2369EB; Thu, 28 Apr 2022 06:35:49 -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 sin.source.kernel.org (Postfix) with ESMTPS id E4A82CE2A9E; Thu, 28 Apr 2022 13:35:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A0573C385AA; Thu, 28 Apr 2022 13:35:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651152946; bh=Yem0bnNbFNUn8TX2xhzhUAMAwGC5I1kgSwaYdUe5wy4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SikuTTS8Ib+DRjwDF3ntqojf93NLALINtVefz2S6XvMKLTqK5OcTF4/FKaozYfVOl LKnjO2M5r1toFFSRozzHAX6hO0bafXWbGhpsnqMaF2tNFkBsbt8mjtAQitb5vyNcBQ N0s0Ht5cpl7CE37rIktOftWqqRK+Y6c471sWVF/ysElfijwmn317b2HkhDhJMSCeHJ +5kduGOi84j3U+A93i83z6sqr+SpZZSLOEkz5VmIO8DsnkDFwfpYTnPhDzwNrsaFeC OgFjDb+rq92hvyTAyB9vuaFOMCQ7NroHNBPoDYO0nL6qvVcwH+42Z/hBJycNuLxsmI 8Jo+0f8KB8qQg== From: Arnd Bergmann To: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: tony@atomide.com, jmkrzyszt@gmail.com, aaro.koskinen@iki.fi, vireshk@kernel.org, shiraz.linux.kernel@gmail.com, nsekhar@ti.com, brgl@bgdev.pl, linux-kernel@vger.kernel.org, Arnd Bergmann , kernel test robot Subject: [PATCH 5/6] ARM: omap2: fix missing declaration warnings Date: Thu, 28 Apr 2022 15:31:57 +0200 Message-Id: <20220428133210.990808-6-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20220428133210.990808-1-arnd@kernel.org> References: <20220428133210.990808-1-arnd@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann Moving the plat-omap files triggered a sparse warning for omap1 and omap2 that is now in a different file from before. Found some more sparse warnings here that I address by making sure the declaration is visible to both the caller and the callee, or they are static mach-omap1/fb.c:33:17: warning: symbol 'omap_fb_resources' was not declared. Should it be static? mach-omap1/timer32k.c:215:12: warning: symbol 'omap_init_clocksource_32k' was not declared. Should it be static? mach-omap1/i2c.c:36:12: warning: symbol 'omap_i2c_add_bus' was not declared. Should it be static? mach-omap1/i2c.c:115:12: warning: symbol 'omap_register_i2c_bus_cmdline' was not declared. Should it be static? mach-omap1/i2c.c:140:12: warning: symbol 'omap_register_i2c_bus' was not declared. Should it be static? mach-omap2/dma.c:180:34: warning: symbol 'dma_plat_info' was not declared. Should it be static? mach-omap2/omap4-common.c:116:6: warning: symbol 'omap_interconnect_sync' was not declared. Should it be static? mach-omap2/omap-iommu.c:113:5: warning: symbol 'omap_iommu_set_pwrdm_constraint' was not declared. Should it be static? Reported-by: kernel test robot Signed-off-by: Arnd Bergmann --- arch/arm/mach-omap1/fb.c | 2 +- arch/arm/mach-omap1/i2c.c | 1 + arch/arm/mach-omap1/timer32k.c | 2 +- arch/arm/mach-omap2/common.h | 13 ++++++++++++- arch/arm/mach-omap2/dma.c | 1 + arch/arm/mach-omap2/omap-iommu.c | 1 + arch/arm/mach-omap2/pdata-quirks.c | 11 ----------- 7 files changed, 17 insertions(+), 14 deletions(-) diff --git a/arch/arm/mach-omap1/fb.c b/arch/arm/mach-omap1/fb.c index a4538c231f66..b6e952b03838 100644 --- a/arch/arm/mach-omap1/fb.c +++ b/arch/arm/mach-omap1/fb.c @@ -30,7 +30,7 @@ static struct omapfb_platform_data omapfb_config; static u64 omap_fb_dma_mask = ~(u32)0; -struct resource omap_fb_resources[] = { +static struct resource omap_fb_resources[] = { { .name = "irq", .start = INT_LCD_CTRL, diff --git a/arch/arm/mach-omap1/i2c.c b/arch/arm/mach-omap1/i2c.c index f574eb0bcc0b..22f945360599 100644 --- a/arch/arm/mach-omap1/i2c.c +++ b/arch/arm/mach-omap1/i2c.c @@ -10,6 +10,7 @@ #include "mux.h" #include "soc.h" +#include "i2c.h" #define OMAP_I2C_SIZE 0x3f #define OMAP1_I2C_BASE 0xfffb3800 diff --git a/arch/arm/mach-omap1/timer32k.c b/arch/arm/mach-omap1/timer32k.c index 560cd16568a7..410d17d1d443 100644 --- a/arch/arm/mach-omap1/timer32k.c +++ b/arch/arm/mach-omap1/timer32k.c @@ -212,7 +212,7 @@ static void omap_read_persistent_clock64(struct timespec64 *ts) * Returns 0 upon success or negative error code upon failure. * */ -int __init omap_init_clocksource_32k(void __iomem *vbase) +static int __init omap_init_clocksource_32k(void __iomem *vbase) { int ret; diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h index 32f58f58515e..bd5981945239 100644 --- a/arch/arm/mach-omap2/common.h +++ b/arch/arm/mach-omap2/common.h @@ -266,7 +266,7 @@ extern void omap4_sar_ram_init(void); extern void __iomem *omap4_get_sar_ram_base(void); extern void omap4_mpuss_early_init(void); extern void omap_do_wfi(void); - +extern void omap_interconnect_sync(void); #ifdef CONFIG_SMP /* Needed for secondary core boot */ @@ -360,5 +360,16 @@ extern int omap_dss_reset(struct omap_hwmod *); /* SoC specific clock initializer */ int omap_clk_init(void); +#if IS_ENABLED(CONFIG_OMAP_IOMMU) +int omap_iommu_set_pwrdm_constraint(struct platform_device *pdev, bool request, + u8 *pwrst); +#else +static inline int omap_iommu_set_pwrdm_constraint(struct platform_device *pdev, + bool request, u8 *pwrst) +{ + return 0; +} +#endif + #endif /* __ASSEMBLER__ */ #endif /* __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H */ diff --git a/arch/arm/mach-omap2/dma.c b/arch/arm/mach-omap2/dma.c index dfc9b21ff19b..830cd4e7eb44 100644 --- a/arch/arm/mach-omap2/dma.c +++ b/arch/arm/mach-omap2/dma.c @@ -30,6 +30,7 @@ #include #include "soc.h" +#include "common.h" static const struct omap_dma_reg reg_map[] = { [REVISION] = { 0x0000, 0x00, OMAP_DMA_REG_32BIT }, diff --git a/arch/arm/mach-omap2/omap-iommu.c b/arch/arm/mach-omap2/omap-iommu.c index 93c20bbd7b7e..9c8a85198e16 100644 --- a/arch/arm/mach-omap2/omap-iommu.c +++ b/arch/arm/mach-omap2/omap-iommu.c @@ -13,6 +13,7 @@ #include "clockdomain.h" #include "powerdomain.h" +#include "common.h" struct pwrdm_link { struct device *dev; diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c index e7fd29a502a0..13f1b89f74b8 100644 --- a/arch/arm/mach-omap2/pdata-quirks.c +++ b/arch/arm/mach-omap2/pdata-quirks.c @@ -43,17 +43,6 @@ struct pdata_init { static struct of_dev_auxdata omap_auxdata_lookup[]; static struct twl4030_gpio_platform_data twl_gpio_auxdata; -#if IS_ENABLED(CONFIG_OMAP_IOMMU) -int omap_iommu_set_pwrdm_constraint(struct platform_device *pdev, bool request, - u8 *pwrst); -#else -static inline int omap_iommu_set_pwrdm_constraint(struct platform_device *pdev, - bool request, u8 *pwrst) -{ - return 0; -} -#endif - #ifdef CONFIG_MACH_NOKIA_N8X0 static void __init omap2420_n8x0_legacy_init(void) { -- 2.29.2 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 87CA6C433EF for ; Thu, 28 Apr 2022 13:47:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RAvwHTa/v6qO2IEIRwuANPtlrtQXmdenFbzIKDV6GzM=; b=4/pCIr9+phwoU+ JKcdjbE/PHv2qj09bSPe+AqHEuuzYRU42MaMt4DWb4deMmsGT7+fis7zpQp6xUCjDU9nR3SVUrY0H bISRwxOU9s8ymCX5cKeyRN7Vey5q+EohzVj3ykHgdGx8xYPSxE5gXViKDcGHvcB61q+aUf+gUFqaI sKEj8bfv9zWXiW/PRu3SBOWvA7cFPwZX1RsgzgYP9XxF4/JyzyLi4GznKetOq/vDdZzMqATc+rfa+ hx/bSfpNWcyUICQxydo1gmlCyUCO6yUQK3OF8YSSC4bPRkm6ysOy10p0MLUIPb/Ug6Th9f1LIP6x7 MpYhcnO1xa+DteDTNGKA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nk4Sg-007AZD-3a; Thu, 28 Apr 2022 13:45:39 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nk4JC-0076E7-AK for linux-arm-kernel@lists.infradead.org; Thu, 28 Apr 2022 13:35:52 +0000 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 sin.source.kernel.org (Postfix) with ESMTPS id EA689CE2AE4; Thu, 28 Apr 2022 13:35:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A0573C385AA; Thu, 28 Apr 2022 13:35:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651152946; bh=Yem0bnNbFNUn8TX2xhzhUAMAwGC5I1kgSwaYdUe5wy4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SikuTTS8Ib+DRjwDF3ntqojf93NLALINtVefz2S6XvMKLTqK5OcTF4/FKaozYfVOl LKnjO2M5r1toFFSRozzHAX6hO0bafXWbGhpsnqMaF2tNFkBsbt8mjtAQitb5vyNcBQ N0s0Ht5cpl7CE37rIktOftWqqRK+Y6c471sWVF/ysElfijwmn317b2HkhDhJMSCeHJ +5kduGOi84j3U+A93i83z6sqr+SpZZSLOEkz5VmIO8DsnkDFwfpYTnPhDzwNrsaFeC OgFjDb+rq92hvyTAyB9vuaFOMCQ7NroHNBPoDYO0nL6qvVcwH+42Z/hBJycNuLxsmI 8Jo+0f8KB8qQg== From: Arnd Bergmann To: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: tony@atomide.com, jmkrzyszt@gmail.com, aaro.koskinen@iki.fi, vireshk@kernel.org, shiraz.linux.kernel@gmail.com, nsekhar@ti.com, brgl@bgdev.pl, linux-kernel@vger.kernel.org, Arnd Bergmann , kernel test robot Subject: [PATCH 5/6] ARM: omap2: fix missing declaration warnings Date: Thu, 28 Apr 2022 15:31:57 +0200 Message-Id: <20220428133210.990808-6-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20220428133210.990808-1-arnd@kernel.org> References: <20220428133210.990808-1-arnd@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220428_063550_792663_E25A204E X-CRM114-Status: GOOD ( 20.14 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Arnd Bergmann Moving the plat-omap files triggered a sparse warning for omap1 and omap2 that is now in a different file from before. Found some more sparse warnings here that I address by making sure the declaration is visible to both the caller and the callee, or they are static mach-omap1/fb.c:33:17: warning: symbol 'omap_fb_resources' was not declared. Should it be static? mach-omap1/timer32k.c:215:12: warning: symbol 'omap_init_clocksource_32k' was not declared. Should it be static? mach-omap1/i2c.c:36:12: warning: symbol 'omap_i2c_add_bus' was not declared. Should it be static? mach-omap1/i2c.c:115:12: warning: symbol 'omap_register_i2c_bus_cmdline' was not declared. Should it be static? mach-omap1/i2c.c:140:12: warning: symbol 'omap_register_i2c_bus' was not declared. Should it be static? mach-omap2/dma.c:180:34: warning: symbol 'dma_plat_info' was not declared. Should it be static? mach-omap2/omap4-common.c:116:6: warning: symbol 'omap_interconnect_sync' was not declared. Should it be static? mach-omap2/omap-iommu.c:113:5: warning: symbol 'omap_iommu_set_pwrdm_constraint' was not declared. Should it be static? Reported-by: kernel test robot Signed-off-by: Arnd Bergmann --- arch/arm/mach-omap1/fb.c | 2 +- arch/arm/mach-omap1/i2c.c | 1 + arch/arm/mach-omap1/timer32k.c | 2 +- arch/arm/mach-omap2/common.h | 13 ++++++++++++- arch/arm/mach-omap2/dma.c | 1 + arch/arm/mach-omap2/omap-iommu.c | 1 + arch/arm/mach-omap2/pdata-quirks.c | 11 ----------- 7 files changed, 17 insertions(+), 14 deletions(-) diff --git a/arch/arm/mach-omap1/fb.c b/arch/arm/mach-omap1/fb.c index a4538c231f66..b6e952b03838 100644 --- a/arch/arm/mach-omap1/fb.c +++ b/arch/arm/mach-omap1/fb.c @@ -30,7 +30,7 @@ static struct omapfb_platform_data omapfb_config; static u64 omap_fb_dma_mask = ~(u32)0; -struct resource omap_fb_resources[] = { +static struct resource omap_fb_resources[] = { { .name = "irq", .start = INT_LCD_CTRL, diff --git a/arch/arm/mach-omap1/i2c.c b/arch/arm/mach-omap1/i2c.c index f574eb0bcc0b..22f945360599 100644 --- a/arch/arm/mach-omap1/i2c.c +++ b/arch/arm/mach-omap1/i2c.c @@ -10,6 +10,7 @@ #include "mux.h" #include "soc.h" +#include "i2c.h" #define OMAP_I2C_SIZE 0x3f #define OMAP1_I2C_BASE 0xfffb3800 diff --git a/arch/arm/mach-omap1/timer32k.c b/arch/arm/mach-omap1/timer32k.c index 560cd16568a7..410d17d1d443 100644 --- a/arch/arm/mach-omap1/timer32k.c +++ b/arch/arm/mach-omap1/timer32k.c @@ -212,7 +212,7 @@ static void omap_read_persistent_clock64(struct timespec64 *ts) * Returns 0 upon success or negative error code upon failure. * */ -int __init omap_init_clocksource_32k(void __iomem *vbase) +static int __init omap_init_clocksource_32k(void __iomem *vbase) { int ret; diff --git a/arch/arm/mach-omap2/common.h b/arch/arm/mach-omap2/common.h index 32f58f58515e..bd5981945239 100644 --- a/arch/arm/mach-omap2/common.h +++ b/arch/arm/mach-omap2/common.h @@ -266,7 +266,7 @@ extern void omap4_sar_ram_init(void); extern void __iomem *omap4_get_sar_ram_base(void); extern void omap4_mpuss_early_init(void); extern void omap_do_wfi(void); - +extern void omap_interconnect_sync(void); #ifdef CONFIG_SMP /* Needed for secondary core boot */ @@ -360,5 +360,16 @@ extern int omap_dss_reset(struct omap_hwmod *); /* SoC specific clock initializer */ int omap_clk_init(void); +#if IS_ENABLED(CONFIG_OMAP_IOMMU) +int omap_iommu_set_pwrdm_constraint(struct platform_device *pdev, bool request, + u8 *pwrst); +#else +static inline int omap_iommu_set_pwrdm_constraint(struct platform_device *pdev, + bool request, u8 *pwrst) +{ + return 0; +} +#endif + #endif /* __ASSEMBLER__ */ #endif /* __ARCH_ARM_MACH_OMAP2PLUS_COMMON_H */ diff --git a/arch/arm/mach-omap2/dma.c b/arch/arm/mach-omap2/dma.c index dfc9b21ff19b..830cd4e7eb44 100644 --- a/arch/arm/mach-omap2/dma.c +++ b/arch/arm/mach-omap2/dma.c @@ -30,6 +30,7 @@ #include #include "soc.h" +#include "common.h" static const struct omap_dma_reg reg_map[] = { [REVISION] = { 0x0000, 0x00, OMAP_DMA_REG_32BIT }, diff --git a/arch/arm/mach-omap2/omap-iommu.c b/arch/arm/mach-omap2/omap-iommu.c index 93c20bbd7b7e..9c8a85198e16 100644 --- a/arch/arm/mach-omap2/omap-iommu.c +++ b/arch/arm/mach-omap2/omap-iommu.c @@ -13,6 +13,7 @@ #include "clockdomain.h" #include "powerdomain.h" +#include "common.h" struct pwrdm_link { struct device *dev; diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c index e7fd29a502a0..13f1b89f74b8 100644 --- a/arch/arm/mach-omap2/pdata-quirks.c +++ b/arch/arm/mach-omap2/pdata-quirks.c @@ -43,17 +43,6 @@ struct pdata_init { static struct of_dev_auxdata omap_auxdata_lookup[]; static struct twl4030_gpio_platform_data twl_gpio_auxdata; -#if IS_ENABLED(CONFIG_OMAP_IOMMU) -int omap_iommu_set_pwrdm_constraint(struct platform_device *pdev, bool request, - u8 *pwrst); -#else -static inline int omap_iommu_set_pwrdm_constraint(struct platform_device *pdev, - bool request, u8 *pwrst) -{ - return 0; -} -#endif - #ifdef CONFIG_MACH_NOKIA_N8X0 static void __init omap2420_n8x0_legacy_init(void) { -- 2.29.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel