lkml.org 
[lkml]   [2020]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRE: [PATCH v1 1/3] vt: keyboard, use GENMAASK()/BIT() macros instead of open coded variants
    Date
    From: Andy Shevchenko
    > Sent: 06 November 2020 14:36
    >
    > There are few places when GENMASK() or BIT() macro is suitable and makes code
    > easier to understand.
    >
    ...
    > - if ((d & ~0xff) == BRL_UC_ROW) {
    > - if ((ch & ~0xff) == BRL_UC_ROW)
    > + if ((d & ~GENMASK(7, 0)) == BRL_UC_ROW) {
    > + if ((ch & ~GENMASK(7, 0)) == BRL_UC_ROW)
    > return d | ch;

    Do you really think that makes it more readable?

    David

    -
    Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
    Registration No: 1397386 (Wales)

    \
     
     \ /
      Last update: 2020-11-06 16:34    [W:2.827 / U:0.208 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site