Commit e577ba72 authored by Marc Kleine-Budde's avatar Marc Kleine-Budde

can: c_can: c_can_plaform: fix checkpatch warnings

This patch fixes several checkpatch warnings in the c_can_platform
driver glue code.
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent 8ce8c0ab
......@@ -39,10 +39,11 @@
#include "c_can.h"
#define DCAN_RAM_INIT_BIT (1 << 3)
#define DCAN_RAM_INIT_BIT BIT(3)
static DEFINE_SPINLOCK(raminit_lock);
/*
* 16-bit c_can registers can be arranged differently in the memory
/* 16-bit c_can registers can be arranged differently in the memory
* architecture of different implementations. For example: 16-bit
* registers can be aligned to a 16-bit boundary or 32-bit boundary etc.
* Handle the same by providing a common read/write interface.
......@@ -54,7 +55,7 @@ static u16 c_can_plat_read_reg_aligned_to_16bit(const struct c_can_priv *priv,
}
static void c_can_plat_write_reg_aligned_to_16bit(const struct c_can_priv *priv,
enum reg index, u16 val)
enum reg index, u16 val)
{
writew(val, priv->base + priv->regs[index]);
}
......@@ -66,7 +67,7 @@ static u16 c_can_plat_read_reg_aligned_to_32bit(const struct c_can_priv *priv,
}
static void c_can_plat_write_reg_aligned_to_32bit(const struct c_can_priv *priv,
enum reg index, u16 val)
enum reg index, u16 val)
{
writew(val, priv->base + 2 * priv->regs[index]);
}
......@@ -144,13 +145,13 @@ static u32 c_can_plat_read_reg32(const struct c_can_priv *priv, enum reg index)
u32 val;
val = priv->read_reg(priv, index);
val |= ((u32) priv->read_reg(priv, index + 1)) << 16;
val |= ((u32)priv->read_reg(priv, index + 1)) << 16;
return val;
}
static void c_can_plat_write_reg32(const struct c_can_priv *priv, enum reg index,
u32 val)
static void c_can_plat_write_reg32(const struct c_can_priv *priv,
enum reg index, u32 val)
{
priv->write_reg(priv, index + 1, val >> 16);
priv->write_reg(priv, index, val);
......@@ -161,8 +162,8 @@ static u32 d_can_plat_read_reg32(const struct c_can_priv *priv, enum reg index)
return readl(priv->base + priv->regs[index]);
}
static void d_can_plat_write_reg32(const struct c_can_priv *priv, enum reg index,
u32 val)
static void d_can_plat_write_reg32(const struct c_can_priv *priv,
enum reg index, u32 val)
{
writel(val, priv->base + priv->regs[index]);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment