linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fabio Aiuto <fabioaiuto83@gmail.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: hdegoede@redhat.com, Larry.Finger@lwfinger.net,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
	David Sterba <dsterba@suse.cz>
Subject: Re: [PATCH] staging: rtl8723bs: remove unused BIT macros definitions
Date: Fri, 30 Jul 2021 15:35:29 +0200	[thread overview]
Message-ID: <20210730133528.GE1433@agape.jhs> (raw)
In-Reply-To: <YQP/dFZJiEcOb3yH@kroah.com>

Hello Greg,

On Fri, Jul 30, 2021 at 03:32:36PM +0200, Greg KH wrote:
> On Fri, Jul 30, 2021 at 03:21:03PM +0200, Fabio Aiuto wrote:
> > BIT(x) macro used all over the driver is defined in
> > include/vsdo/bit.h as
> > 
> > - #define BIT(nr)	(UL(1) << (nr))
> > 
> > which is safer than the local BIT macros declared.
> > Local macros shift a signed integer which brings
> > unespected results. For example:
> > 
> > (unsigned long)(1 << 31) => 0xffffffff80000000
> > 
> > shift.c:
> > 
> > int main() {
> >         printf("%lx\n", (unsigned long)(1 << 31));
> >         printf("%lx\n", (unsigned long)(1U << 31));
> >         return 0;
> > }
> > ---
> > 
> > $ ./shift
> > ffffffff80000000
> > 80000000
> > ---
> 
> Don't put "---" in a changelog text, otherwise the signed-off-by will be
> cut off.  Can you resend it with that changed to something else like
> "---------------" or anything else?
> 
> thanks,
> 
> greg k-h

sure I'm about to send a v2,

thank you,

fabio

  reply	other threads:[~2021-07-30 13:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-30 13:21 Fabio Aiuto
2021-07-30 13:32 ` Greg KH
2021-07-30 13:35   ` Fabio Aiuto [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-07-30 13:19 Fabio Aiuto
2021-07-30 13:23 ` Fabio Aiuto

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=20210730133528.GE1433@agape.jhs \
    --to=fabioaiuto83@gmail.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=dsterba@suse.cz \
    --cc=gregkh@linuxfoundation.org \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --subject='Re: [PATCH] staging: rtl8723bs: remove unused BIT macros definitions' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).