staging: media: parport: remove unused variable
Subsystems (2)
PATCH 1/1 staging: media: parport: remove unused variable
This patch uses the following coccinelle script to remove a variable that was simply used to store the return value of a function call before returning it:
@@
identifier len,f;
@@
-int len;
... when != len
when strict
-len =
+return
f(...);
-return len;
Signed-off-by Aya Mahfouz <[email protected]>
--- drivers/staging/media/parport/pms.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/staging/media/parport/pms.c +1 -4
@@ -875,10 +875,7 @@ static ssize_t pms_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) { struct pms *dev = video_drvdata(file); -int len; - - len =pms_capture (dev, buf, (dev->depth ==15 ), count); -return len; +return pms_capture (dev, buf, (dev->depth ==15 ), count); }static unsigned int pms_poll (struct file *file,struct poll_table_struct *wait)
Signature · 1 line
1.9.3
Acked-by Julia Lawall <[email protected]>
Quoted 47 lines · Aya Mahfouz
This patch uses the following coccinelle script to remove a variable that was simply used to store the return value of a function call before returning it:
@@
identifier len,f;
@@(quoted diff) +1
-2-int len; ... when != len when strict -len = +returnf(...);-return len;
Signed-off-by Aya Mahfouz <[email protected]>--- drivers/staging/media/parport/pms.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)drivers/staging/media/parport/pms.c +1
-4@@ -875,10 +875,7 @@ static ssize_t pms_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) { struct pms *dev = video_drvdata(file); -int len; - - len =pms_capture (dev, buf, (dev->depth ==15 ), count); -return len; +return pms_capture (dev, buf, (dev->depth ==15 ), count); }static unsigned int pms_poll (struct file *file,struct poll_table_struct *wait)Signature · 8 lines
1.9.3 -- You received this message because you are subscribed to the Google Groups "outreachy-kernel" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20150218003417.GA16982%40localhost.localdomain. For more options, visit https://groups.google.com/d/optout.
Greg KH
maintainerQuoted 14 lines · Aya Mahfouz
This patch uses the following coccinelle script to remove a variable that was simply used to store the return value of a function call before returning it:
@@
identifier len,f;
@@(quoted diff) +1
-2-int len; ... when != len when strict -len = +returnf(...);
Quoted 7 lines
-return len;
Signed-off-by Aya Mahfouz <[email protected]>Acked-by Julia Lawall <[email protected]>--- drivers/staging/media/parport/pms.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
This file is no longer in Linus's tree :(