lkml.org 
[lkml]   [2018]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH v3 06/10] drivers/peci: Add a PECI adapter driver for Aspeed AST24xx/AST25xx
    From
    Date
    Just a drive-by nit:

    On 10/04/18 19:32, Jae Hyun Yoo wrote:
    [...]
    > +#define PECI_CTRL_SAMPLING_MASK GENMASK(19, 16)
    > +#define PECI_CTRL_SAMPLING(x) (((x) << 16) & PECI_CTRL_SAMPLING_MASK)
    > +#define PECI_CTRL_SAMPLING_GET(x) (((x) & PECI_CTRL_SAMPLING_MASK) >> 16)

    FWIW, <linux/bitfield.h> already provides functionality like this, so it
    might be worth taking a look at FIELD_{GET,PREP}() to save all these
    local definitions.

    Robin.

    \
     
     \ /
      Last update: 2018-04-17 15:38    [W:3.239 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site