Re: [PATCH] staging: vchiq_arm: Make vchiq_platform_init() static

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 18, 2023 at 11:44:19AM -0700, Nathan Chancellor wrote:
> On Tue, Apr 18, 2023 at 01:23:11PM +0200, Simon Horman wrote:
> > vchiq_platform_init() is only used in this file so it can be static.
> > 
> > clang-16 with W=1 reports:
> > 
> >  drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:465:5: error: no previous prototype for function 'vchiq_platform_init' [-Werror,-Wmissing-prototypes]
> >  int vchiq_platform_init(struct platform_device *pdev, struct vchiq_state *state)
> >      ^
> >  drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c:465:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
> > 
> > Signed-off-by: Simon Horman <horms@xxxxxxxxxx>
> 
> Introduced by commit 89cc4218f640 ("staging: vchiq_arm: drop unnecessary
> declarations"), not sure it is worth a fixes tag since it is a W=1
> warning.

Thanks. For some reason it didn't occur to me to check which
patch introduced the issue. Perhaps because, as you say, it's a W=1
issue, and I don't think that warrants a fixes tag.

I could include some information in the commit message, like
"Introduced by ..." if desired.

> Reviewed-by: Nathan Chancellor <nathan@xxxxxxxxxx>
> 
> > ---
> >  drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c | 3 ++-
> >  1 file changed, 2 insertions(+), 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 40dd62cf7399..59312b9f2058 100644
> > --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
> > +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
> > @@ -462,7 +462,8 @@ free_pagelist(struct vchiq_instance *instance, struct vchiq_pagelist_info *pagel
> >  	cleanup_pagelistinfo(instance, 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);
> > 
> 




[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux