Re: [Outreachy kernel] Re: [PATCH 7/9] staging: rtl8723bs: Fix incorrect type in argument warnings

Javier F. Arias
2019-11-13T01:12:32Z

On Tue, Nov 12, 2019 at 09:33:43PM +0100, Greg KH wrote:
> On Tue, Nov 12, 2019 at 11:55:27AM -0500, Javier F. Arias wrote:
> > Fix incorrect type in declarations to solve the 'incorrect
> > type in argument 3' warnings in the rtw_get_ie function calls.
> > Issue found by Sparse.
> >
> > Signed-off-by: Javier F. Arias <jarias.linux@gmail.com>
> > ---
> > drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
> > index db6528a01229..bb63295e8d4e 100644
> > --- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
> > +++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
> > @@ -83,7 +83,7 @@ static char *translate_scan(struct adapter *padapter,
> > {
> > struct iw_event iwe;
> > u16 cap;
> > - u32 ht_ielen = 0;
> > + sint ht_ielen = 0;
>
> sint? Ick, try fixing up the function call itself please.
>
> thanks,
>
> greg k-h

Hello Greg,

I found that rtw_get_ie is called 62 times and the passed argument
can be declared as sint, uint, u32, u8 and probably a couple more.
I'll drop this patch for now and check more carefully if this fix
would require more changes, as changing the argument type wouldn't
solve the warning described in the commit.

>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20191112203343.GA1833645%40kroah.com.