Skip to content

Commit 252f211

Browse files
bijudaswsakernel
authored andcommitted
i2c: rzv2m: Replace lowercase macros with static inline functions
Convert macros bit_setl and bit_clrl with static inline functions as normally we'd put macro names in all uppercase. Reported-by: Pavel Machek <[email protected]> Signed-off-by: Biju Das <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
1 parent 3c4b88d commit 252f211

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

drivers/i2c/busses/i2c-rzv2m.c

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@
5050
#define IICB0MDSC BIT(7) /* Bus Mode */
5151
#define IICB0SLSE BIT(1) /* Start condition output */
5252

53-
#define bit_setl(addr, val) writel(readl(addr) | (val), (addr))
54-
#define bit_clrl(addr, val) writel(readl(addr) & ~(val), (addr))
55-
5653
struct rzv2m_i2c_priv {
5754
void __iomem *base;
5855
struct i2c_adapter adap;
@@ -78,6 +75,16 @@ static const struct bitrate_config bitrate_configs[] = {
7875
[RZV2M_I2C_400K] = { 52, 900 },
7976
};
8077

78+
static inline void bit_setl(void __iomem *addr, u32 val)
79+
{
80+
writel(readl(addr) | val, addr);
81+
}
82+
83+
static inline void bit_clrl(void __iomem *addr, u32 val)
84+
{
85+
writel(readl(addr) & ~val, addr);
86+
}
87+
8188
static irqreturn_t rzv2m_i2c_tia_irq_handler(int this_irq, void *dev_id)
8289
{
8390
struct rzv2m_i2c_priv *priv = dev_id;

0 commit comments

Comments
 (0)