lkml.org 
[lkml]   [2022]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v2 6/6] staging: r8188eu: remove local BIT macro
    On Tue, Mar 15, 2022 at 09:50:41PM +0100, Martin Kaiser wrote:
    > The r8188eu driver defines a local BIT(x) macro. Remove this local macro
    > and use the one from include/linux/bits.h.
    >
    > The global BIT macro returns an unsigned long value. Therefore, we have to
    > cast DYNAMIC_BB_DYNAMIC_TXPWR to u32 explicitly. This define is used with
    > the bitwise not operator.
    >
    > Signed-off-by: Martin Kaiser <martin@kaiser.cx>
    > ---
    > v2:
    > - cast DYNAMIC_BB_DYNAMIC_TXPWR to u32, fix build error on 64-bit systems
    >
    > drivers/staging/r8188eu/include/rtw_mlme_ext.h | 2 +-
    > drivers/staging/r8188eu/include/wifi.h | 7 +------
    > 2 files changed, 2 insertions(+), 7 deletions(-)
    >
    > diff --git a/drivers/staging/r8188eu/include/rtw_mlme_ext.h b/drivers/staging/r8188eu/include/rtw_mlme_ext.h
    > index 0c555ea6719b..2b5089be5156 100644
    > --- a/drivers/staging/r8188eu/include/rtw_mlme_ext.h
    > +++ b/drivers/staging/r8188eu/include/rtw_mlme_ext.h
    > @@ -34,7 +34,7 @@
    > /* BB ODM section BIT 0-15 */
    > #define DYNAMIC_BB_DIG BIT(0)
    > #define DYNAMIC_BB_RA_MASK BIT(1)
    > -#define DYNAMIC_BB_DYNAMIC_TXPWR BIT(2)
    > +#define DYNAMIC_BB_DYNAMIC_TXPWR ((u32)BIT(2))

    That's really odd, why the cast for just one define? Try fixing up
    where this is used instead.

    thanks,

    greg k-h

    \
     
     \ /
      Last update: 2022-09-17 16:17    [W:2.386 / U:0.440 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site