Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

memstick r592: make memstick_debug_get_tpc_name() static

There are no other files referencing this function, apparently
it was left global to avoid an 'unused function' warning when
the only caller is left out. With a 'W=1' build, it causes
a 'missing prototype' warning though:

drivers/memstick/host/r592.c:47:13: error: no previous prototype for 'memstick_debug_get_tpc_name' [-Werror=missing-prototypes]

Annotate the function as 'static __maybe_unused' to avoid both
problems.

Fixes: 926341250102 ("memstick: add driver for Ricoh R5C592 card reader")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20230516202714.560929-1-arnd@kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Arnd Bergmann and committed by
Ulf Hansson
434587df a3332b7a

+1 -3
+1 -3
drivers/memstick/host/r592.c
··· 44 44 * memstick_debug_get_tpc_name - debug helper that returns string for 45 45 * a TPC number 46 46 */ 47 - const char *memstick_debug_get_tpc_name(int tpc) 47 + static __maybe_unused const char *memstick_debug_get_tpc_name(int tpc) 48 48 { 49 49 return tpc_names[tpc-1]; 50 50 } 51 - EXPORT_SYMBOL(memstick_debug_get_tpc_name); 52 - 53 51 54 52 /* Read a register*/ 55 53 static inline u32 r592_read_reg(struct r592_device *dev, int address)