* [PATCH] i2c: s3c2410: remove unused variable
@ 2015-07-16 20:36 Laurent Navet
2015-07-16 20:40 ` Wolfram Sang
0 siblings, 1 reply; 2+ messages in thread
From: Laurent Navet @ 2015-07-16 20:36 UTC (permalink / raw)
To: kgene, k.kozlowski, wsa
Cc: linux-arm-kernel, linux-samsung-soc, linux-i2c, linux-kernel,
Laurent Navet
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] i2c: s3c2410: remove unused variable
2015-07-16 20:36 [PATCH] i2c: s3c2410: remove unused variable Laurent Navet
@ 2015-07-16 20:40 ` Wolfram Sang
0 siblings, 0 replies; 2+ messages in thread
From: Wolfram Sang @ 2015-07-16 20:40 UTC (permalink / raw)
To: Laurent Navet
Cc: kgene, k.kozlowski, linux-arm-kernel, linux-samsung-soc,
linux-i2c, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 243 bytes --]
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?
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-07-16 20:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-16 20:36 [PATCH] i2c: s3c2410: remove unused variable Laurent Navet
2015-07-16 20:40 ` Wolfram Sang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).