linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Fabio Aiuto <fabioaiuto83@gmail.com>
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:32:36 +0200	[thread overview]
Message-ID: <YQP/dFZJiEcOb3yH@kroah.com> (raw)
In-Reply-To: <20210730132103.4996-1-fabioaiuto83@gmail.com>

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

  reply	other threads:[~2021-07-30 13:32 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 [this message]
2021-07-30 13:35   ` Fabio Aiuto
  -- 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=YQP/dFZJiEcOb3yH@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=Larry.Finger@lwfinger.net \
    --cc=dsterba@suse.cz \
    --cc=fabioaiuto83@gmail.com \
    --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).