public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Samuel Abraham <abrahamadekunle50@gmail.com>,
	Julia Lawall <julia.lawall@inria.fr>,
	outreachy@lists.linux.dev, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8723bs: modify struct field to use standard bool type
Date: Thu, 3 Apr 2025 15:06:52 +0100	[thread overview]
Message-ID: <2025040340-boogeyman-reclining-3cbf@gregkh> (raw)
In-Reply-To: <c3ae531d-259c-4bfc-863d-45d08bdd6189@stanley.mountain>

On Thu, Apr 03, 2025 at 05:02:45PM +0300, Dan Carpenter wrote:
> On Thu, Apr 03, 2025 at 02:54:01PM +0100, Greg Kroah-Hartman wrote:
> > > > > diff --git a/drivers/staging/rtl8723bs/include/sta_info.h b/drivers/staging/rtl8723bs/include/sta_info.h
> > > > > index b3535fed3de7..63343998266a 100644
> > > > > --- a/drivers/staging/rtl8723bs/include/sta_info.h
> > > > > +++ b/drivers/staging/rtl8723bs/include/sta_info.h
> > > > > @@ -86,7 +86,7 @@ struct sta_info {
> > > > >       uint qos_option;
> > > > >       u8 hwaddr[ETH_ALEN];
> > > > >
> > > > > -     uint    ieee8021x_blocked;      /* 0: allowed, 1:blocked */
> > > > > +     bool ieee8021x_blocked;
> > > 
> > > > You should also check whether this is a structure that is read from the
> > > > hardware.  In that case, it would be a concern if the bool field does not
> > > > have the same size as the uint one.
> > > Hello Julia
> > > So following the conversation here,
> > > https://lore.kernel.org/outreachy/bf8994cc-b812-f628-ff43-5dae8426e266@inria.fr/T/#u
> > > I was able to compare the assembly code of the file before and after
> > > my patch and this were my findings
> > > 
> > > Original assembly code for
> > > # drivers/staging/rtl8723bs/core/rtw_ap.c:392    psta->ieee8021x_blocked = 0;
> > > movl  $0, 436(%r12)    #,  psta->ieee8021x_blocked
> > > 
> > > Assembly Code After Patch
> > > # drivers/staging/rtl8723bs/core/rtw_ap.c:392
> > > psta->ieee8021x_blocked = false;
> > > movb  $0, 434(%r12)    #,  psta->ieee8021x_blocked
> > 
> > So the structure size changed?  That's not good at all, and is what I
> > was worried about :(
> > 
> 
> You had complained about a different struct.  struct rx_pkt_attrib.  It's
> fine to modify this one.

Argh, sorry, too many different threads right now, my fault...

      reply	other threads:[~2025-04-03 14:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-02 13:18 [PATCH] staging: rtl8723bs: modify struct field to use standard bool type Abraham Samuel Adekunle
2025-04-03  5:06 ` Julia Lawall
2025-04-03  7:09   ` Samuel Abraham
2025-04-03  9:33   ` Samuel Abraham
2025-04-03 13:54     ` Greg Kroah-Hartman
2025-04-03 14:02       ` Dan Carpenter
2025-04-03 14:06         ` Greg Kroah-Hartman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2025040340-boogeyman-reclining-3cbf@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=abrahamadekunle50@gmail.com \
    --cc=dan.carpenter@linaro.org \
    --cc=julia.lawall@inria.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=outreachy@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox