Skip to contentSkip to conversation

greybus: svc: Remove unused declarations

PATCH In review Yue Haibing 3 participants 4 messages Aug 18, 2023 – Aug 23, 2023 Greybus

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 greybus: svc: Remove unused declarations

Commit 84427943d2da ("greybus: svc: drop legacy-protocol dependency") removed these implementations but not the declarations.

---
 include/linux/greybus/svc.h | 3 ---
 1 file changed, 3 deletions(-)
include/linux/greybus/svc.h +0 -3
index 5afaf5f06856..da547fb9071b 100644
@@ -100,7 +100,4 @@ bool gb_svc_watchdog_enabled(struct gb_svc *svc);
 int gb_svc_watchdog_enable(struct gb_svc *svc);
 int gb_svc_watchdog_disable(struct gb_svc *svc);
 
-int gb_svc_protocol_init(void);
-void gb_svc_protocol_exit(void);
-
 #endif /* __SVC_H */
Signature · 1 line
2.34.1
maintainer
#1 lore raw
Quoted 23 lines · Yue Haibing

Commit 84427943d2da ("greybus: svc: drop legacy-protocol dependency") removed these implementations but not the declarations.

---
 include/linux/greybus/svc.h | 3 ---
 1 file changed, 3 deletions(-)
include/linux/greybus/svc.h +0 -3
index 5afaf5f06856..da547fb9071b 100644
@@ -100,7 +100,4 @@ bool gb_svc_watchdog_enabled(struct gb_svc *svc);
 int gb_svc_watchdog_enable(struct gb_svc *svc);
 int gb_svc_watchdog_disable(struct gb_svc *svc);
 
-int gb_svc_protocol_init(void);
-void gb_svc_protocol_exit(void);
-
 #endif /* __SVC_H */
Signature · 1 line
2.34.1

Nice, how did you find these?

#2 lore raw
Quoted 17 lines · Greg KH
Quoted 16 lines · Yue Haibing

Commit 84427943d2da ("greybus: svc: drop legacy-protocol dependency") removed these implementations but not the declarations.

---
 include/linux/greybus/svc.h | 3 ---
 1 file changed, 3 deletions(-)
include/linux/greybus/svc.h +0 -0
index 5afaf5f06856..da547fb9071b 100644
@@ -100,7 +100,4 @@ bool gb_svc_watchdog_enabled(struct gb_svc *svc);
 int gb_svc_watchdog_enable(struct gb_svc *svc);
 int gb_svc_watchdog_disable(struct gb_svc *svc);
 
Quoted 9 lines
Quoted 7 lines
include/linux/greybus/svc.h +0 -3
-int gb_svc_protocol_init(void);
-void gb_svc_protocol_exit(void);
-
 #endif /* __SVC_H */
Signature · 1 line
2.34.1

Nice, how did you find these?

Just use grep to check like below, then filter out known false item

grep -rP --include=*.h '^(?:\w+\s+){1,3}\*{0,3}\s{0,3}\w+[\t]*\(' * |grep -P -oh '\w+\s*\('|sort| uniq -c| sort -n| grep -P '^\s+1\b'|sed -r -e 's/^\s+1\s+//' -e 's/\(//'|while read line ;
do

        CNT=`git grep -w $line |wc -l` ;
        if [ $CNT -eq 1 ];then
                git grep -wn $line
        fi

done

Quoted 2 lines

.

maintainer Reviewed-by on v1 1/1
#3 lore raw
In reply to Yue Haibing
Quoted 13 lines · Yue Haibing

Commit 84427943d2da ("greybus: svc: drop legacy-protocol dependency") removed these implementations but not the declarations.

---
 include/linux/greybus/svc.h | 3 ---
 1 file changed, 3 deletions(-)
include/linux/greybus/svc.h +0 -0
index 5afaf5f06856..da547fb9071b 100644

include/linux/greybus/svc.h bool gb_svc_watchdog_enabled(struct gb_svc *svc); · line 103

Quoted 7 lines
include/linux/greybus/svc.h +0 -3
@@ -100,7 +100,4 @@ bool gb_svc_watchdog_enabled(struct gb_svc *svc);
 int gb_svc_watchdog_enable(struct gb_svc *svc);
 int gb_svc_watchdog_disable(struct gb_svc *svc);
 
-int gb_svc_protocol_init(void);
-void gb_svc_protocol_exit(void);
-
 #endif /* __SVC_H */

Yup, these are long gone:

Johan