[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3c235d91-efd6-ddf8-7c9-d8d35c7585@inria.fr>
Date: Wed, 2 Apr 2025 22:34:22 +0200 (CEST)
From: Julia Lawall <julia.lawall@...ia.fr>
To: Greg KH <gregkh@...uxfoundation.org>
cc: Erick Karanja <karanja99erick@...il.com>, outreachy@...ts.linux.dev,
philipp.g.hortmann@...il.com, linux-staging@...ts.linux.dev,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/3] staging: rtl8723bs: Modify struct rx_pkt_attrib
attribute bdecrypted
On Wed, 2 Apr 2025, Greg KH wrote:
> On Wed, Apr 02, 2025 at 08:16:42PM +0300, Erick Karanja wrote:
> > Standardize boolean representation by ensuring consistency,
> > replace instances of 1/0 with true/false where boolean logic is implied,
> > as some definitions already use true/false.
> > This improves code clarity and aligns with the kernel’s bool type usage.
> >
> > Signed-off-by: Erick Karanja <karanja99erick@...il.com>
> > ---
> > drivers/staging/rtl8723bs/core/rtw_recv.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/staging/rtl8723bs/core/rtw_recv.c b/drivers/staging/rtl8723bs/core/rtw_recv.c
> > index a389ba5ecc6f..fd04dbacb50f 100644
> > --- a/drivers/staging/rtl8723bs/core/rtw_recv.c
> > +++ b/drivers/staging/rtl8723bs/core/rtw_recv.c
> > @@ -1358,7 +1358,7 @@ static signed int validate_80211w_mgmt(struct adapter *adapter, union recv_frame
> > u8 *mgmt_DATA;
> > u32 data_len = 0;
> >
> > - pattrib->bdecrypted = 0;
> > + pattrib->bdecrypted = false;
>
> but bdecrypted is a u8, not a boolean type. So setting it to "false"
> does not seem correct here, right?
Is false different than 0?
Elsewhere there is an assignment to true.
julia
>
> Also, the name of the variable should really be changed.
>
> But, step back, are you _SURE_ you can change this structure at all?
> At a quick glance it kind of looks like it comes directly from the
> hardware, or am I mis-reading the driver code?
>
> Have you tested this series on an actual device?
>
> thanks,
>
> greg k-h
>
>
Powered by blists - more mailing lists