[PATCH] staging: vchiq: make vchiq_platform_init static

Jiapeng Chong posted 1 patch 3 years, 11 months ago
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] staging: vchiq: make vchiq_platform_init static
Posted by Jiapeng Chong 3 years, 11 months ago
This symbol is not used outside of vchiq_arm.c, so marks it
static.

Fixes the following w1 warning:

drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:466:5:
warning: no previous prototype for ‘vchiq_platform_init’
[-Wmissing-prototypes].

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
index 0596ac61e286..7de98655e8ec 100644
--- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
+++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
@@ -463,7 +463,7 @@ free_pagelist(struct vchiq_pagelist_info *pagelistinfo,
 	cleanup_pagelistinfo(pagelistinfo);
 }
 
-int vchiq_platform_init(struct platform_device *pdev, struct vchiq_state *state)
+static int vchiq_platform_init(struct platform_device *pdev, struct vchiq_state *state)
 {
 	struct device *dev = &pdev->dev;
 	struct vchiq_drvdata *drvdata = platform_get_drvdata(pdev);
-- 
2.20.1.7.g153144c

Re: [PATCH] staging: vchiq: make vchiq_platform_init static
Posted by Greg KH 3 years, 10 months ago
On Wed, May 25, 2022 at 05:38:51PM +0800, Jiapeng Chong wrote:
> This symbol is not used outside of vchiq_arm.c, so marks it
> static.
> 
> Fixes the following w1 warning:

What tool is "w1"?

> 
> drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:466:5:
> warning: no previous prototype for ‘vchiq_platform_init’
> [-Wmissing-prototypes].

See my previous comments on how to do this properly.

thanks,

greg k-h