lkml.org 
[lkml]   [2021]   [Dec]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v3 10/10] ata: pata_platform: Make use of GENMASK() macro
    Date
    Make use of GENMASK() macro instead of open coding.

    Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
    Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
    ---
    v2-->v3
    * Included RB tag

    v1-->v2
    * New patch
    ---
    drivers/ata/pata_platform.c | 3 +--
    1 file changed, 1 insertion(+), 2 deletions(-)

    diff --git a/drivers/ata/pata_platform.c b/drivers/ata/pata_platform.c
    index b37c1028fd54..b68bce361c74 100644
    --- a/drivers/ata/pata_platform.c
    +++ b/drivers/ata/pata_platform.c
    @@ -253,8 +253,7 @@ static int pata_of_platform_get_pdata(struct platform_device *ofdev,

    priv->use16bit = of_property_read_bool(dn, "ata-generic,use16bit");

    - priv->pio_mask = 1 << pio_mode;
    - priv->pio_mask |= (1 << pio_mode) - 1;
    + priv->pio_mask = GENMASK(pio_mode, 0);

    return 0;
    }
    --
    2.17.1
    \
     
     \ /
      Last update: 2021-12-24 14:14    [W:8.194 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site