[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211221162614.25308-5-prabhakar.mahadev-lad.rj@bp.renesas.com>
Date: Tue, 21 Dec 2021 16:26:14 +0000
From: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
To: Rob Herring <robh+dt@...nel.org>,
Damien Le Moal <damien.lemoal@...nsource.wdc.com>,
Sergey Shtylyov <s.shtylyov@....ru>, linux-ide@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
Prabhakar <prabhakar.csengg@...il.com>,
Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
Subject: [PATCH v2 4/4] ata: pata_platform: Make use of GENMASK() macro
Make use of GENMASK() macro instead of open coding.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
---
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 80e5cb12707e..118b332dae2d 100644
--- a/drivers/ata/pata_platform.c
+++ b/drivers/ata/pata_platform.c
@@ -244,8 +244,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
Powered by blists - more mailing lists