All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: rts5208: xd: remove unused function  xd_check_err_code
@ 2016-10-06 17:14 Bhumika Goyal
  2016-10-09 14:55 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Bhumika Goyal @ 2016-10-06 17:14 UTC (permalink / raw)
  To: outreachy-kernel, gregkh; +Cc: Bhumika Goyal

Remove the function xd_check_err_code as it is not used anywhere in
the kernel. Function detected using Coccinelle but removed by hand.
Script:

@initialize:python@
@@
def display(name,p):
        print(name,p[0].file)

@r1@
identifier func;
type T;
position p;
@@
static T func@p(...)
{
...
}

@r@
identifier r1.func;
@@
func

@script:python depends on !r@
func << r1.func;
p << r1.p;
@@
display(func,p)

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 drivers/staging/rts5208/xd.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/staging/rts5208/xd.c b/drivers/staging/rts5208/xd.c
index 1de02bb..8efc512 100644
--- a/drivers/staging/rts5208/xd.c
+++ b/drivers/staging/rts5208/xd.c
@@ -42,13 +42,6 @@ static inline void xd_set_err_code(struct rtsx_chip *chip, u8 err_code)
 	xd_card->err_code = err_code;
 }
 
-static inline int xd_check_err_code(struct rtsx_chip *chip, u8 err_code)
-{
-	struct xd_info *xd_card = &(chip->xd_card);
-
-	return (xd_card->err_code == err_code);
-}
-
 static int xd_set_init_para(struct rtsx_chip *chip)
 {
 	struct xd_info *xd_card = &(chip->xd_card);
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Staging: rts5208: xd: remove unused function xd_check_err_code
  2016-10-06 17:14 [PATCH] Staging: rts5208: xd: remove unused function xd_check_err_code Bhumika Goyal
@ 2016-10-09 14:55 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2016-10-09 14:55 UTC (permalink / raw)
  To: Bhumika Goyal; +Cc: outreachy-kernel

On Thu, Oct 06, 2016 at 10:44:28PM +0530, Bhumika Goyal wrote:
> Remove the function xd_check_err_code as it is not used anywhere in
> the kernel. Function detected using Coccinelle but removed by hand.
> Script:
> 
> @initialize:python@
> @@
> def display(name,p):
>         print(name,p[0].file)
> 
> @r1@
> identifier func;
> type T;
> position p;
> @@
> static T func@p(...)
> {
> ...
> }
> 
> @r@
> identifier r1.func;
> @@
> func
> 
> @script:python depends on !r@
> func << r1.func;
> p << r1.p;
> @@
> display(func,p)
> 
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
> ---
>  drivers/staging/rts5208/xd.c | 7 -------
>  1 file changed, 7 deletions(-)

Patch does not apply to my tree :(


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-10-09 14:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-06 17:14 [PATCH] Staging: rts5208: xd: remove unused function xd_check_err_code Bhumika Goyal
2016-10-09 14:55 ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.