Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1186227 > unrolled thread

[PATCH] i2c: s3c2410: remove unused variable

Started byLaurent Navet <laurent.navet@gmail.com>
First post2015-07-16 22:30 +0200
Last post2015-07-16 22:50 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] i2c: s3c2410: remove unused variable Laurent Navet <laurent.navet@gmail.com> - 2015-07-16 22:30 +0200
    Re: [PATCH] i2c: s3c2410: remove unused variable Wolfram Sang <wsa@the-dreams.de> - 2015-07-16 22:50 +0200

#1186227 — [PATCH] i2c: s3c2410: remove unused variable

FromLaurent Navet <laurent.navet@gmail.com>
Date2015-07-16 22:30 +0200
Subject[PATCH] i2c: s3c2410: remove unused variable
Message-ID<pMXX4-ws-11@gated-at.bofh.it>
ret is assigned zero and just used to return. remove it.
Found by using coccinelle.

Signed-off-by: Laurent Navet <laurent.navet@gmail.com>
---
 drivers/i2c/busses/i2c-s3c2410.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
index 50bfd8c..cf3c6c0 100644
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -409,7 +409,6 @@ static int i2c_s3c_irq_nextbyte(struct s3c24xx_i2c *i2c, unsigned long iicstat)
 {
 	unsigned long tmp;
 	unsigned char byte;
-	int ret = 0;
 
 	switch (i2c->state) {
 
@@ -565,7 +564,7 @@ static int i2c_s3c_irq_nextbyte(struct s3c24xx_i2c *i2c, unsigned long iicstat)
 	tmp &= ~S3C2410_IICCON_IRQPEND;
 	writel(tmp, i2c->regs + S3C2410_IICCON);
  out:
-	return ret;
+	return 0;
 }
 
 /* s3c24xx_i2c_irq
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1186237

FromWolfram Sang <wsa@the-dreams.de>
Date2015-07-16 22:50 +0200
Message-ID<pMYgq-SY-23@gated-at.bofh.it>
In reply to#1186227

[Multipart message — attachments visible in raw view] — view raw

On Thu, Jul 16, 2015 at 10:36:16PM +0200, Laurent Navet wrote:
> ret is assigned zero and just used to return. remove it.
> Found by using coccinelle.
> 
> Signed-off-by: Laurent Navet <laurent.navet@gmail.com>

Why not make it void?

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web