Skip to contentSkip to conversation

Staging: rts5208: xd: remove unused function xd_check_err_code

PATCH In review Bhumika Goyal 2 participants 2 messages Oct 6, 2016 – Oct 9, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: rts5208: xd: remove unused function xd_check_err_code

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)

---
 drivers/staging/rts5208/xd.c | 7 -------
 1 file changed, 7 deletions(-)
drivers/staging/rts5208/xd.c +0 -7
index 1de02bb..8efc512 100644
@@ -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);
Signature · 1 line
1.9.1
maintainer
#1 lore raw
Quoted 30 lines · 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)

Quoted 4 lines
---
 drivers/staging/rts5208/xd.c | 7 -------
 1 file changed, 7 deletions(-)

Patch does not apply to my tree :(