mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
i2c: nomadik: drop superfluous variable initialization
cppcheck rightfully reports those as "reassigned a value before the old one has been used." Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Cc: Linus Walleij <linus.walleij@stericsson.com>
This commit is contained in:
parent
24e9e157d5
commit
876ae85c8b
1 changed files with 3 additions and 6 deletions
|
@ -412,8 +412,7 @@ static void setup_i2c_controller(struct nmk_i2c_dev *dev)
|
||||||
static int read_i2c(struct nmk_i2c_dev *dev, u16 flags)
|
static int read_i2c(struct nmk_i2c_dev *dev, u16 flags)
|
||||||
{
|
{
|
||||||
u32 status = 0;
|
u32 status = 0;
|
||||||
u32 mcr;
|
u32 mcr, irq_mask;
|
||||||
u32 irq_mask = 0;
|
|
||||||
int timeout;
|
int timeout;
|
||||||
|
|
||||||
mcr = load_i2c_mcr_reg(dev, flags);
|
mcr = load_i2c_mcr_reg(dev, flags);
|
||||||
|
@ -482,8 +481,7 @@ static void fill_tx_fifo(struct nmk_i2c_dev *dev, int no_bytes)
|
||||||
static int write_i2c(struct nmk_i2c_dev *dev, u16 flags)
|
static int write_i2c(struct nmk_i2c_dev *dev, u16 flags)
|
||||||
{
|
{
|
||||||
u32 status = 0;
|
u32 status = 0;
|
||||||
u32 mcr;
|
u32 mcr, irq_mask;
|
||||||
u32 irq_mask = 0;
|
|
||||||
int timeout;
|
int timeout;
|
||||||
|
|
||||||
mcr = load_i2c_mcr_reg(dev, flags);
|
mcr = load_i2c_mcr_reg(dev, flags);
|
||||||
|
@ -731,8 +729,7 @@ static irqreturn_t i2c_irq_handler(int irq, void *arg)
|
||||||
struct nmk_i2c_dev *dev = arg;
|
struct nmk_i2c_dev *dev = arg;
|
||||||
u32 tft, rft;
|
u32 tft, rft;
|
||||||
u32 count;
|
u32 count;
|
||||||
u32 misr;
|
u32 misr, src;
|
||||||
u32 src = 0;
|
|
||||||
|
|
||||||
/* load Tx FIFO and Rx FIFO threshold values */
|
/* load Tx FIFO and Rx FIFO threshold values */
|
||||||
tft = readl(dev->virtbase + I2C_TFTR);
|
tft = readl(dev->virtbase + I2C_TFTR);
|
||||||
|
|
Loading…
Add table
Reference in a new issue