lkml.org 
[lkml]   [2021]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] staging: rtl8723bs: remove unused BIT macros definitions
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

\
 
 \ /
  Last update: 2021-07-30 15:33    [W:0.057 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site