[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YolRut+PJ68J9mcM@KernelVM>
Date: Sat, 21 May 2022 21:56:51 +0100
From: Phillip Potter <phil@...lpotter.co.uk>
To: Pavel Skripkin <paskripkin@...il.com>
Cc: Martin Kaiser <lists@...ser.cx>,
Jiasheng Jiang <jiasheng@...as.ac.cn>,
dan.carpenter@...cle.com, Larry.Finger@...inger.net,
phil@...lpotter.co.uk, gregkh@...uxfoundation.org,
straube.linux@...il.com, fmdefrancesco@...il.com,
linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] staging: r8188eu: add check for kzalloc
On Sat, May 21, 2022 at 11:26:55PM +0300, Pavel Skripkin wrote:
> Hi Martin,
>
> On 5/21/22 18:50, Martin Kaiser wrote:
> >
> > > for (i = 0; i < 4; i++)
> > > @@ -1474,7 +1479,7 @@ s32 rtw_xmit_classifier(struct adapter *padapter, struct xmit_frame *pxmitframe)
> >
> >
> > res is still 0 here - but the caller of _rtw_init_xmit_priv compares
> > this return value with _SUCCESS (1) or _FAIL (0) and interprets it as
> > _FAIL.
> >
>
> I think, it's time to make
>
> s/_SUCCESS/0/
> s/_FAIL/-1
>
> since developers from outside of staging are confused.
> The main problem will be with functions that return an int (or s32).
>
> Will take a look.
>
>
>
> With regards,
> Pavel Skripkin
Hi Pavel,
I agree with you totally - we should change these semantics to reflect
how the rest of the kernel generally does things. That said, that is a
bigger patch set and I noticed the driver was broken before I read this
thread, so I've submitted a patch already just to fix the breakage for
now.
Changing these semantics is a bigger patch/patchset and I wanted to get
this out in the meantime - if you are looking at doing this conversion I
will by all means leave that alone as no desire to tread on anyones
toes :-)
Regards,
Phil
Powered by blists - more mailing lists