[00/10] Fix a bunch SCSI related W=1 warnings

Message ID 20200707140055.2956235-1-lee.jones@linaro.org
Headers show
Series
  • Fix a bunch SCSI related W=1 warnings
Related show

Message

Lee Jones July 7, 2020, 2 p.m.
This set is part of a larger effort attempting to clean-up W=1
kernel builds, which are currently overwhelmingly riddled with
niggly little warnings.

There are a whole lot more of these.  More fixes to follow.

Lee Jones (10):
  scsi: megaraid: megaraid_mm: Strip excess function param description
  scsi: megaraid: megaraid_mbox: Fix some kerneldoc bitrot
  scsi: fdomain: Mark 'fdomain_pm_ops' as __maybe_unused
  scsi: megaraid: megaraid_sas_fusion: Fix-up a whole myriad of
    kerneldoc misdemeanours
  scsi: megaraid: megaraid_sas_base: Provide prototypes for non-static
    functions
  scsi: aha152x: Remove unused variable 'ret'
  scsi: pcmcia: nsp_cs: Use new __printf() format notation
  scsi: pcmcia: nsp_cs: Remove unused variable 'dummy'
  scsi: libfc: fc_disc: Fix-up some incorrectly referenced function
    parameters
  scsi: megaraid: megaraid_sas: Convert forward-declarations to
    prototypes

 drivers/scsi/aha152x.c                      |   3 +-
 drivers/scsi/fdomain.h                      |   2 +-
 drivers/scsi/libfc/fc_disc.c                |   6 +-
 drivers/scsi/megaraid/megaraid_mbox.c       |   4 +-
 drivers/scsi/megaraid/megaraid_mm.c         |   1 -
 drivers/scsi/megaraid/megaraid_sas.h        |  25 ++++-
 drivers/scsi/megaraid/megaraid_sas_base.c   |   4 -
 drivers/scsi/megaraid/megaraid_sas_fusion.c | 102 ++++++++------------
 drivers/scsi/megaraid/megaraid_sas_fusion.h |   6 ++
 drivers/scsi/pcmcia/nsp_cs.c                |   5 +-
 10 files changed, 81 insertions(+), 77 deletions(-)

-- 
2.25.1

Comments

Damien Le Moal July 8, 2020, 12:53 a.m. | #1
On 2020/07/07 23:01, Lee Jones wrote:
> This set is part of a larger effort attempting to clean-up W=1
> kernel builds, which are currently overwhelmingly riddled with
> niggly little warnings.
> 
> There are a whole lot more of these.  More fixes to follow.

Hi Lee,

I posted a series doing that cleanup for megaraid, mpt3sas sd and sd_zbc yesterday.

https://www.spinics.net/lists/linux-scsi/msg144023.html

Probably could merge the series since yours touches other drivers too.

> 
> Lee Jones (10):
>   scsi: megaraid: megaraid_mm: Strip excess function param description
>   scsi: megaraid: megaraid_mbox: Fix some kerneldoc bitrot
>   scsi: fdomain: Mark 'fdomain_pm_ops' as __maybe_unused
>   scsi: megaraid: megaraid_sas_fusion: Fix-up a whole myriad of
>     kerneldoc misdemeanours
>   scsi: megaraid: megaraid_sas_base: Provide prototypes for non-static
>     functions
>   scsi: aha152x: Remove unused variable 'ret'
>   scsi: pcmcia: nsp_cs: Use new __printf() format notation
>   scsi: pcmcia: nsp_cs: Remove unused variable 'dummy'
>   scsi: libfc: fc_disc: Fix-up some incorrectly referenced function
>     parameters
>   scsi: megaraid: megaraid_sas: Convert forward-declarations to
>     prototypes
> 
>  drivers/scsi/aha152x.c                      |   3 +-
>  drivers/scsi/fdomain.h                      |   2 +-
>  drivers/scsi/libfc/fc_disc.c                |   6 +-
>  drivers/scsi/megaraid/megaraid_mbox.c       |   4 +-
>  drivers/scsi/megaraid/megaraid_mm.c         |   1 -
>  drivers/scsi/megaraid/megaraid_sas.h        |  25 ++++-
>  drivers/scsi/megaraid/megaraid_sas_base.c   |   4 -
>  drivers/scsi/megaraid/megaraid_sas_fusion.c | 102 ++++++++------------
>  drivers/scsi/megaraid/megaraid_sas_fusion.h |   6 ++
>  drivers/scsi/pcmcia/nsp_cs.c                |   5 +-
>  10 files changed, 81 insertions(+), 77 deletions(-)
>
Martin K. Petersen July 8, 2020, 6:06 a.m. | #2
On Tue, 7 Jul 2020 15:00:45 +0100, Lee Jones wrote:

> This set is part of a larger effort attempting to clean-up W=1

> kernel builds, which are currently overwhelmingly riddled with

> niggly little warnings.

> 

> There are a whole lot more of these.  More fixes to follow.

> 

> Lee Jones (10):

>   scsi: megaraid: megaraid_mm: Strip excess function param description

>   scsi: megaraid: megaraid_mbox: Fix some kerneldoc bitrot

>   scsi: fdomain: Mark 'fdomain_pm_ops' as __maybe_unused

>   scsi: megaraid: megaraid_sas_fusion: Fix-up a whole myriad of

>     kerneldoc misdemeanours

>   scsi: megaraid: megaraid_sas_base: Provide prototypes for non-static

>     functions

>   scsi: aha152x: Remove unused variable 'ret'

>   scsi: pcmcia: nsp_cs: Use new __printf() format notation

>   scsi: pcmcia: nsp_cs: Remove unused variable 'dummy'

>   scsi: libfc: fc_disc: Fix-up some incorrectly referenced function

>     parameters

>   scsi: megaraid: megaraid_sas: Convert forward-declarations to

>     prototypes

> 

> [...]


Applied to 5.9/scsi-queue, thanks!

[03/10] scsi: fdomain: Mark 'fdomain_pm_ops' as __maybe_unused
        https://git.kernel.org/mkp/scsi/c/4be1fa2b55a8
[06/10] scsi: aha152x: Remove unused variable 'ret'
        https://git.kernel.org/mkp/scsi/c/3c011793aca7
[07/10] scsi: pcmcia: nsp_cs: Use new __printf() format notation
        https://git.kernel.org/mkp/scsi/c/af0b55d06004
[08/10] scsi: pcmcia: nsp_cs: Remove unused variable 'dummy'
        https://git.kernel.org/mkp/scsi/c/97a33483425d
[09/10] scsi: libfc: fc_disc: Fix-up some incorrectly referenced function parameters
        https://git.kernel.org/mkp/scsi/c/b1987c884585

-- 
Martin K. Petersen	Oracle Linux Engineering
Lee Jones July 8, 2020, 6:51 a.m. | #3
On Wed, 08 Jul 2020, Martin K. Petersen wrote:

> On Tue, 7 Jul 2020 15:00:45 +0100, Lee Jones wrote:

> 

> > This set is part of a larger effort attempting to clean-up W=1

> > kernel builds, which are currently overwhelmingly riddled with

> > niggly little warnings.

> > 

> > There are a whole lot more of these.  More fixes to follow.

> > 

> > Lee Jones (10):

> >   scsi: megaraid: megaraid_mm: Strip excess function param description

> >   scsi: megaraid: megaraid_mbox: Fix some kerneldoc bitrot

> >   scsi: fdomain: Mark 'fdomain_pm_ops' as __maybe_unused

> >   scsi: megaraid: megaraid_sas_fusion: Fix-up a whole myriad of

> >     kerneldoc misdemeanours

> >   scsi: megaraid: megaraid_sas_base: Provide prototypes for non-static

> >     functions

> >   scsi: aha152x: Remove unused variable 'ret'

> >   scsi: pcmcia: nsp_cs: Use new __printf() format notation

> >   scsi: pcmcia: nsp_cs: Remove unused variable 'dummy'

> >   scsi: libfc: fc_disc: Fix-up some incorrectly referenced function

> >     parameters

> >   scsi: megaraid: megaraid_sas: Convert forward-declarations to

> >     prototypes

> > 

> > [...]

> 

> Applied to 5.9/scsi-queue, thanks!

> 

> [03/10] scsi: fdomain: Mark 'fdomain_pm_ops' as __maybe_unused

>         https://git.kernel.org/mkp/scsi/c/4be1fa2b55a8

> [06/10] scsi: aha152x: Remove unused variable 'ret'

>         https://git.kernel.org/mkp/scsi/c/3c011793aca7

> [07/10] scsi: pcmcia: nsp_cs: Use new __printf() format notation

>         https://git.kernel.org/mkp/scsi/c/af0b55d06004

> [08/10] scsi: pcmcia: nsp_cs: Remove unused variable 'dummy'

>         https://git.kernel.org/mkp/scsi/c/97a33483425d

> [09/10] scsi: libfc: fc_disc: Fix-up some incorrectly referenced function parameters

>         https://git.kernel.org/mkp/scsi/c/b1987c884585


Thanks Martin.

Out of interest, do you know of any other efforts to fix W=1 warnings
in SCSI?  I was going to clean the whole sub-system, but I really
would like to avoid duplicating efforts if at all possible.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
Lee Jones July 8, 2020, 6:51 a.m. | #4
On Wed, 08 Jul 2020, Damien Le Moal wrote:

> On 2020/07/07 23:01, Lee Jones wrote:

> > This set is part of a larger effort attempting to clean-up W=1

> > kernel builds, which are currently overwhelmingly riddled with

> > niggly little warnings.

> > 

> > There are a whole lot more of these.  More fixes to follow.

> 

> Hi Lee,

> 

> I posted a series doing that cleanup for megaraid, mpt3sas sd and sd_zbc yesterday.

> 

> https://www.spinics.net/lists/linux-scsi/msg144023.html

> 

> Probably could merge the series since yours touches other drivers too.


Do you have plans to fix anything else, or should I continue?

> > Lee Jones (10):

> >   scsi: megaraid: megaraid_mm: Strip excess function param description

> >   scsi: megaraid: megaraid_mbox: Fix some kerneldoc bitrot

> >   scsi: fdomain: Mark 'fdomain_pm_ops' as __maybe_unused

> >   scsi: megaraid: megaraid_sas_fusion: Fix-up a whole myriad of

> >     kerneldoc misdemeanours

> >   scsi: megaraid: megaraid_sas_base: Provide prototypes for non-static

> >     functions

> >   scsi: aha152x: Remove unused variable 'ret'

> >   scsi: pcmcia: nsp_cs: Use new __printf() format notation

> >   scsi: pcmcia: nsp_cs: Remove unused variable 'dummy'

> >   scsi: libfc: fc_disc: Fix-up some incorrectly referenced function

> >     parameters

> >   scsi: megaraid: megaraid_sas: Convert forward-declarations to

> >     prototypes

> > 

> >  drivers/scsi/aha152x.c                      |   3 +-

> >  drivers/scsi/fdomain.h                      |   2 +-

> >  drivers/scsi/libfc/fc_disc.c                |   6 +-

> >  drivers/scsi/megaraid/megaraid_mbox.c       |   4 +-

> >  drivers/scsi/megaraid/megaraid_mm.c         |   1 -

> >  drivers/scsi/megaraid/megaraid_sas.h        |  25 ++++-

> >  drivers/scsi/megaraid/megaraid_sas_base.c   |   4 -

> >  drivers/scsi/megaraid/megaraid_sas_fusion.c | 102 ++++++++------------

> >  drivers/scsi/megaraid/megaraid_sas_fusion.h |   6 ++

> >  drivers/scsi/pcmcia/nsp_cs.c                |   5 +-

> >  10 files changed, 81 insertions(+), 77 deletions(-)

> > 

> 

> 


-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
Martin K. Petersen July 8, 2020, 7:17 a.m. | #5
Lee,

> Out of interest, do you know of any other efforts to fix W=1 warnings

> in SCSI?


I am not.

I try to encourage that all new patches get compiled with C=1/W=1. If I
could, I would strictly enforce this. However, there is just too much
vintage code around at this point. And even some of the most actively
developed "contemporary" drivers suffer from a large amount of sparse
warnings. Would love to see things cleaned up.

-- 
Martin K. Petersen	Oracle Linux Engineering
Lee Jones July 8, 2020, 7:28 a.m. | #6
On Wed, 08 Jul 2020, Martin K. Petersen wrote:

> 

> Lee,

> 

> > Out of interest, do you know of any other efforts to fix W=1 warnings

> > in SCSI?

> 

> I am not.

> 

> I try to encourage that all new patches get compiled with C=1/W=1. If I

> could, I would strictly enforce this. However, there is just too much

> vintage code around at this point. And even some of the most actively

> developed "contemporary" drivers suffer from a large amount of sparse

> warnings.


Exactly.  This is what spurred me on in the first place.  I really
wanted to build my own subsytems with W=1, but due to the very many
spurious build warnings I was forced to avoid them.  Once I fixed my
own, I thought "why not fix others", and here we are.

Backlight, MFD, PWM, USB, Misc, Regulator, GPIO, ASoC and MMC are all
clean.  Now it's SCSI's turn.

> warnings. Would love to see things cleaned up.


Great.  Watch this space.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
Damien Le Moal July 8, 2020, 7:35 a.m. | #7
On 2020/07/08 15:51, Lee Jones wrote:
> On Wed, 08 Jul 2020, Damien Le Moal wrote:
> 
>> On 2020/07/07 23:01, Lee Jones wrote:
>>> This set is part of a larger effort attempting to clean-up W=1
>>> kernel builds, which are currently overwhelmingly riddled with
>>> niggly little warnings.
>>>
>>> There are a whole lot more of these.  More fixes to follow.
>>
>> Hi Lee,
>>
>> I posted a series doing that cleanup for megaraid, mpt3sas sd and sd_zbc yesterday.
>>
>> https://www.spinics.net/lists/linux-scsi/msg144023.html
>>
>> Probably could merge the series since yours touches other drivers too.
> 
> Do you have plans to fix anything else, or should I continue?

I only fixed the warnings for the drivers enabled on my test setup. No real plan
to continue with other drivers for now.

My series did not touch aha, pcmcia and libfc, so these should still apply.

> 
>>> Lee Jones (10):
>>>   scsi: megaraid: megaraid_mm: Strip excess function param description
>>>   scsi: megaraid: megaraid_mbox: Fix some kerneldoc bitrot
>>>   scsi: fdomain: Mark 'fdomain_pm_ops' as __maybe_unused
>>>   scsi: megaraid: megaraid_sas_fusion: Fix-up a whole myriad of
>>>     kerneldoc misdemeanours
>>>   scsi: megaraid: megaraid_sas_base: Provide prototypes for non-static
>>>     functions
>>>   scsi: aha152x: Remove unused variable 'ret'
>>>   scsi: pcmcia: nsp_cs: Use new __printf() format notation
>>>   scsi: pcmcia: nsp_cs: Remove unused variable 'dummy'
>>>   scsi: libfc: fc_disc: Fix-up some incorrectly referenced function
>>>     parameters
>>>   scsi: megaraid: megaraid_sas: Convert forward-declarations to
>>>     prototypes
>>>
>>>  drivers/scsi/aha152x.c                      |   3 +-
>>>  drivers/scsi/fdomain.h                      |   2 +-
>>>  drivers/scsi/libfc/fc_disc.c                |   6 +-
>>>  drivers/scsi/megaraid/megaraid_mbox.c       |   4 +-
>>>  drivers/scsi/megaraid/megaraid_mm.c         |   1 -
>>>  drivers/scsi/megaraid/megaraid_sas.h        |  25 ++++-
>>>  drivers/scsi/megaraid/megaraid_sas_base.c   |   4 -
>>>  drivers/scsi/megaraid/megaraid_sas_fusion.c | 102 ++++++++------------
>>>  drivers/scsi/megaraid/megaraid_sas_fusion.h |   6 ++
>>>  drivers/scsi/pcmcia/nsp_cs.c                |   5 +-
>>>  10 files changed, 81 insertions(+), 77 deletions(-)
>>>
>>
>>
>
Lee Jones July 8, 2020, 7:42 a.m. | #8
On Wed, 08 Jul 2020, Damien Le Moal wrote:

> On 2020/07/08 15:51, Lee Jones wrote:

> > On Wed, 08 Jul 2020, Damien Le Moal wrote:

> > 

> >> On 2020/07/07 23:01, Lee Jones wrote:

> >>> This set is part of a larger effort attempting to clean-up W=1

> >>> kernel builds, which are currently overwhelmingly riddled with

> >>> niggly little warnings.

> >>>

> >>> There are a whole lot more of these.  More fixes to follow.

> >>

> >> Hi Lee,

> >>

> >> I posted a series doing that cleanup for megaraid, mpt3sas sd and sd_zbc yesterday.

> >>

> >> https://www.spinics.net/lists/linux-scsi/msg144023.html

> >>

> >> Probably could merge the series since yours touches other drivers too.

> > 

> > Do you have plans to fix anything else, or should I continue?

> 

> I only fixed the warnings for the drivers enabled on my test setup. No real plan

> to continue with other drivers for now.

> 

> My series did not touch aha, pcmcia and libfc, so these should still apply.


Great.  Thanks for letting me know.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog