drivers: memstick: Mark function memstick_debug_get_tpc_name() as static in r592.c
Subsystems (2)
PATCH 1/1 drivers: memstick: Mark function memstick_debug_get_tpc_name() as static in r592.c
This patch marks the function memstick_debug_get_tpc_name() as static in host/r592.c because it is not used outside this file.
Thus, it also eliminates the following warning in host/r592.c:drivers/memstick/host/r592.c:50:13: warning: no previous prototype for ‘memstick_debug_get_tpc_name’ [-Wmissing-prototypes]
--- drivers/memstick/host/r592.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/memstick/host/r592.c +1 -1
@@ -47,7 +47,7 @@ static const char *tpc_names[] = {* memstick_debug_get_tpc_name - debug helper that returns string for * a TPC number */ -const char *memstick_debug_get_tpc_name (int tpc) +static const char *memstick_debug_get_tpc_name (int tpc) {return tpc_names[tpc-1 ]; }
Signature · 1 line
1.7.9.5
Quoted 5 lines · Rashika Kheria
This patch marks the function
memstick_debug_get_tpc_name()as static inhost/r592.cbecause it is not used outside this file.Thus, it also eliminates the following warning in
host/r592.c:drivers/memstick/host/r592.c:50:13: warning: no previous prototype for ‘memstick_debug_get_tpc_name’ [-Wmissing-prototypes]
In this case, memstick_debug_get_tpc_name is exported. However, nothing in the kernel uses it. Thus, I'd suggest additionally deleting the EXPORT_SYMBOL for it, leaving it as a static function only used internally within that file.
Quoted 19 lines
drivers/memstick/host/r592.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/memstick/host/r592.c +1
-1@@ -47,7 +47,7 @@ static const char *tpc_names[] = {* memstick_debug_get_tpc_name - debug helper that returns string for * a TPC number */ -const char *memstick_debug_get_tpc_name (int tpc) +static const char *memstick_debug_get_tpc_name (int tpc) {return tpc_names[tpc-1 ]; }Signature · 1 line
1.7.9.5
PATCH v2 1/1 drivers: memstick: Mark function memstick_debug_get_tpc_name() as static in r592.c
In reply to Rashika KheriaThis patch marks the function memstick_debug_get_tpc_name() as static in host/r592.c because it is not used outside this file. It also removes the EXPORT_SYMBOL because the function is not used anywhere else in the kernel.
Thus, it also eliminates the following warning in host/r592.c:drivers/memstick/host/r592.c:50:13: warning: no previous prototype for ‘memstick_debug_get_tpc_name’ [-Wmissing-prototypes]
--- drivers/memstick/host/r592.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/memstick/host/r592.c +1 -3
@@ -47,12 +47,10 @@ static const char *tpc_names[] = {* memstick_debug_get_tpc_name - debug helper that returns string for * a TPC number */ -const char *memstick_debug_get_tpc_name (int tpc) +static const char *memstick_debug_get_tpc_name (int tpc) {return tpc_names[tpc-1 ]; } -EXPORT_SYMBOL (memstick_debug_get_tpc_name); -/* Read a register*/ static inline u32 r592_read_reg (struct r592_device *dev,int address)
Signature · 1 line
1.7.9.5
Quoted 9 lines · Rashika Kheria
This patch marks the function
memstick_debug_get_tpc_name()as static inhost/r592.cbecause it is not used outside this file. It also removes theEXPORT_SYMBOLbecause the function is not used anywhere else in the kernel.Thus, it also eliminates the following warning in
host/r592.c:drivers/memstick/host/r592.c:50:13: warning: no previous prototype for ‘memstick_debug_get_tpc_name’ [-Wmissing-prototypes]Signed-off-by Rashika Kheria <[email protected]>
Quoted 24 lines
drivers/memstick/host/r592.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/memstick/host/r592.c +1
-3@@ -47,12 +47,10 @@ static const char *tpc_names[] = {* memstick_debug_get_tpc_name - debug helper that returns string for * a TPC number */ -const char *memstick_debug_get_tpc_name (int tpc) +static const char *memstick_debug_get_tpc_name (int tpc) {return tpc_names[tpc-1 ]; } -EXPORT_SYMBOL (memstick_debug_get_tpc_name); -/* Read a register*/ static inline u32 r592_read_reg (struct r592_device *dev,int address)Signature · 1 line
1.7.9.5