linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] ARM: mmp: Make some symbols static
@ 2022-08-17  8:14 Chen Lifu
  2022-10-08  8:45 ` chenlifu
  0 siblings, 1 reply; 2+ messages in thread
From: Chen Lifu @ 2022-08-17  8:14 UTC (permalink / raw)
  To: lkundrak, linux, arnd, linux-arm-kernel, linux-kernel, kbuild-all
  Cc: chenlifu

These symbols pxa168_usb_phy_resources, pxa168_u2o_resources,
pxa168_u2oehci_resources and pxa168_u2ootg_resources are not used
outside of arch/arm/mach-mmp/devices.c, so mark them static.

Fixes the following sparse warning:

arch/arm/mach-mmp/devices.c:241:17: warning: symbol 'pxa168_usb_phy_resources' was not declared. Should it be static?
arch/arm/mach-mmp/devices.c:262:17: warning: symbol 'pxa168_u2o_resources' was not declared. Should it be static?
arch/arm/mach-mmp/devices.c:297:17: warning: symbol 'pxa168_u2oehci_resources' was not declared. Should it be static?
arch/arm/mach-mmp/devices.c:324:17: warning: symbol 'pxa168_u2ootg_resources' was not declared. Should it be static?

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Chen Lifu <chenlifu@huawei.com>
---
 arch/arm/mach-mmp/devices.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-mmp/devices.c b/arch/arm/mach-mmp/devices.c
index 79f4a2aa5475..9968239d8041 100644
--- a/arch/arm/mach-mmp/devices.c
+++ b/arch/arm/mach-mmp/devices.c
@@ -236,11 +236,11 @@ void pxa_usb_phy_deinit(void __iomem *phy_reg)
 
 #if IS_ENABLED(CONFIG_USB_SUPPORT)
 static u64 __maybe_unused usb_dma_mask = ~(u32)0;
 
 #if IS_ENABLED(CONFIG_PHY_PXA_USB)
-struct resource pxa168_usb_phy_resources[] = {
+static struct resource pxa168_usb_phy_resources[] = {
 	[0] = {
 		.start	= PXA168_U2O_PHYBASE,
 		.end	= PXA168_U2O_PHYBASE + USB_PHY_RANGE,
 		.flags	= IORESOURCE_MEM,
 	},
@@ -257,11 +257,11 @@ struct platform_device pxa168_device_usb_phy = {
 	}
 };
 #endif /* CONFIG_PHY_PXA_USB */
 
 #if IS_ENABLED(CONFIG_USB_MV_UDC)
-struct resource pxa168_u2o_resources[] = {
+static struct resource pxa168_u2o_resources[] = {
 	/* regbase */
 	[0] = {
 		.start	= PXA168_U2O_REGBASE + U2x_CAPREGS_OFFSET,
 		.end	= PXA168_U2O_REGBASE + USB_REG_RANGE,
 		.flags	= IORESOURCE_MEM,
@@ -292,11 +292,11 @@ struct platform_device pxa168_device_u2o = {
 	}
 };
 #endif /* CONFIG_USB_MV_UDC */
 
 #if IS_ENABLED(CONFIG_USB_EHCI_MV_U2O)
-struct resource pxa168_u2oehci_resources[] = {
+static struct resource pxa168_u2oehci_resources[] = {
 	[0] = {
 		.start	= PXA168_U2O_REGBASE,
 		.end	= PXA168_U2O_REGBASE + USB_REG_RANGE,
 		.flags	= IORESOURCE_MEM,
 	},
@@ -319,11 +319,11 @@ struct platform_device pxa168_device_u2oehci = {
 	.resource	= pxa168_u2oehci_resources,
 };
 #endif
 
 #if IS_ENABLED(CONFIG_USB_MV_OTG)
-struct resource pxa168_u2ootg_resources[] = {
+static struct resource pxa168_u2ootg_resources[] = {
 	/* regbase */
 	[0] = {
 		.start	= PXA168_U2O_REGBASE + U2x_CAPREGS_OFFSET,
 		.end	= PXA168_U2O_REGBASE + USB_REG_RANGE,
 		.flags	= IORESOURCE_MEM,
-- 
2.37.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH -next] ARM: mmp: Make some symbols static
  2022-08-17  8:14 [PATCH -next] ARM: mmp: Make some symbols static Chen Lifu
@ 2022-10-08  8:45 ` chenlifu
  0 siblings, 0 replies; 2+ messages in thread
From: chenlifu @ 2022-10-08  8:45 UTC (permalink / raw)
  To: lkundrak, linux, arnd, linux-arm-kernel, linux-kernel, kbuild-all

在 2022/8/17 16:14, Chen Lifu 写道:
> These symbols pxa168_usb_phy_resources, pxa168_u2o_resources,
> pxa168_u2oehci_resources and pxa168_u2ootg_resources are not used
> outside of arch/arm/mach-mmp/devices.c, so mark them static.
> 
> Fixes the following sparse warning:
> 
> arch/arm/mach-mmp/devices.c:241:17: warning: symbol 'pxa168_usb_phy_resources' was not declared. Should it be static?
> arch/arm/mach-mmp/devices.c:262:17: warning: symbol 'pxa168_u2o_resources' was not declared. Should it be static?
> arch/arm/mach-mmp/devices.c:297:17: warning: symbol 'pxa168_u2oehci_resources' was not declared. Should it be static?
> arch/arm/mach-mmp/devices.c:324:17: warning: symbol 'pxa168_u2ootg_resources' was not declared. Should it be static?
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Chen Lifu <chenlifu@huawei.com>
> ---
>   arch/arm/mach-mmp/devices.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/mach-mmp/devices.c b/arch/arm/mach-mmp/devices.c
> index 79f4a2aa5475..9968239d8041 100644
> --- a/arch/arm/mach-mmp/devices.c
> +++ b/arch/arm/mach-mmp/devices.c
> @@ -236,11 +236,11 @@ void pxa_usb_phy_deinit(void __iomem *phy_reg)
>   
>   #if IS_ENABLED(CONFIG_USB_SUPPORT)
>   static u64 __maybe_unused usb_dma_mask = ~(u32)0;
>   
>   #if IS_ENABLED(CONFIG_PHY_PXA_USB)
> -struct resource pxa168_usb_phy_resources[] = {
> +static struct resource pxa168_usb_phy_resources[] = {
>   	[0] = {
>   		.start	= PXA168_U2O_PHYBASE,
>   		.end	= PXA168_U2O_PHYBASE + USB_PHY_RANGE,
>   		.flags	= IORESOURCE_MEM,
>   	},
> @@ -257,11 +257,11 @@ struct platform_device pxa168_device_usb_phy = {
>   	}
>   };
>   #endif /* CONFIG_PHY_PXA_USB */
>   
>   #if IS_ENABLED(CONFIG_USB_MV_UDC)
> -struct resource pxa168_u2o_resources[] = {
> +static struct resource pxa168_u2o_resources[] = {
>   	/* regbase */
>   	[0] = {
>   		.start	= PXA168_U2O_REGBASE + U2x_CAPREGS_OFFSET,
>   		.end	= PXA168_U2O_REGBASE + USB_REG_RANGE,
>   		.flags	= IORESOURCE_MEM,
> @@ -292,11 +292,11 @@ struct platform_device pxa168_device_u2o = {
>   	}
>   };
>   #endif /* CONFIG_USB_MV_UDC */
>   
>   #if IS_ENABLED(CONFIG_USB_EHCI_MV_U2O)
> -struct resource pxa168_u2oehci_resources[] = {
> +static struct resource pxa168_u2oehci_resources[] = {
>   	[0] = {
>   		.start	= PXA168_U2O_REGBASE,
>   		.end	= PXA168_U2O_REGBASE + USB_REG_RANGE,
>   		.flags	= IORESOURCE_MEM,
>   	},
> @@ -319,11 +319,11 @@ struct platform_device pxa168_device_u2oehci = {
>   	.resource	= pxa168_u2oehci_resources,
>   };
>   #endif
>   
>   #if IS_ENABLED(CONFIG_USB_MV_OTG)
> -struct resource pxa168_u2ootg_resources[] = {
> +static struct resource pxa168_u2ootg_resources[] = {
>   	/* regbase */
>   	[0] = {
>   		.start	= PXA168_U2O_REGBASE + U2x_CAPREGS_OFFSET,
>   		.end	= PXA168_U2O_REGBASE + USB_REG_RANGE,
>   		.flags	= IORESOURCE_MEM,
friendly ping ...

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-10-08  8:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-17  8:14 [PATCH -next] ARM: mmp: Make some symbols static Chen Lifu
2022-10-08  8:45 ` chenlifu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).