Skip to content

Commit

Permalink
i2c: s3c2410: change return type of 'i2c_s3c_irq_nextbyte' from 'int'…
Browse files Browse the repository at this point in the history
… to 'void'

Since ret is a redundant variable, and none of the callers check
for return, so remove ret variable and change return type of
'i2c_s3c_irq_nextbyte' from 'int' to 'void'

Suggested-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Yihao Han <hanyihao@vivo.com>
  • Loading branch information
Yihao Han authored and intel-lab-lkp committed May 6, 2022
1 parent 88fb0c4 commit fdefdf4
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/i2c/busses/i2c-s3c2410.c
Expand Up @@ -381,17 +381,16 @@ static inline int is_msgend(struct s3c24xx_i2c *i2c)
/*
* process an interrupt and work out what to do
*/
static int i2c_s3c_irq_nextbyte(struct s3c24xx_i2c *i2c, unsigned long iicstat)
static void i2c_s3c_irq_nextbyte(struct s3c24xx_i2c *i2c, unsigned long iicstat)
{
unsigned long tmp;
unsigned char byte;
int ret = 0;

switch (i2c->state) {

case STATE_IDLE:
dev_err(i2c->dev, "%s: called in STATE_IDLE\n", __func__);
goto out;
return;

case STATE_STOP:
dev_err(i2c->dev, "%s: called in STATE_STOP\n", __func__);
Expand Down Expand Up @@ -547,8 +546,6 @@ static int i2c_s3c_irq_nextbyte(struct s3c24xx_i2c *i2c, unsigned long iicstat)
tmp = readl(i2c->regs + S3C2410_IICCON);
tmp &= ~S3C2410_IICCON_IRQPEND;
writel(tmp, i2c->regs + S3C2410_IICCON);
out:
return ret;
}

/*
Expand Down

0 comments on commit fdefdf4

Please sign in to comment.