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

scsi: fas216: avoid fas216_log_setup for loadable module

We get a warning for the fas216 driver when it is compiled as a loadable
module, as the __setup() functions are never called then:

scsi/arm/fas216.c:101:19: warning: 'fas216_log_setup' defined but not used [-Wunused-function]
static int __init fas216_log_setup(char *str)

This adds an #ifndef MODULE around the definition to shut up the warning
and clarify for the reader when it is used or not.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Arnd Bergmann and committed by
Martin K. Petersen
dc0d79b5 6fea7f6f

+2
+2
drivers/scsi/arm/fas216.c
··· 98 98 99 99 module_param(level_mask, int, 0644); 100 100 101 + #ifndef MODULE 101 102 static int __init fas216_log_setup(char *str) 102 103 { 103 104 char *s; ··· 139 138 } 140 139 141 140 __setup("fas216_logging=", fas216_log_setup); 141 + #endif 142 142 143 143 static inline unsigned char fas216_readb(FAS216_Info *info, unsigned int reg) 144 144 {