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

usb: storage: Convert usb_stor_dbg to return void

No caller or macro uses the return value so make it void.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Joe Perches and committed by
Greg Kroah-Hartman
e5283626 474fe70b

+8 -9
+2 -5
drivers/usb/storage/debug.c
··· 179 179 US_DEBUGPX("\n"); 180 180 } 181 181 182 - int usb_stor_dbg(const struct us_data *us, const char *fmt, ...) 182 + void usb_stor_dbg(const struct us_data *us, const char *fmt, ...) 183 183 { 184 184 va_list args; 185 - int r; 186 185 187 186 va_start(args, fmt); 188 187 189 - r = dev_vprintk_emit(7, &us->pusb_dev->dev, fmt, args); 188 + dev_vprintk_emit(7, &us->pusb_dev->dev, fmt, args); 190 189 191 190 va_end(args); 192 - 193 - return r; 194 191 } 195 192 EXPORT_SYMBOL_GPL(usb_stor_dbg);
+6 -4
drivers/usb/storage/debug.h
··· 50 50 void usb_stor_show_command(const struct us_data *us, struct scsi_cmnd *srb); 51 51 void usb_stor_show_sense(const struct us_data *us, unsigned char key, 52 52 unsigned char asc, unsigned char ascq); 53 - __printf(2, 3) int usb_stor_dbg(const struct us_data *us, 54 - const char *fmt, ...); 53 + __printf(2, 3) void usb_stor_dbg(const struct us_data *us, 54 + const char *fmt, ...); 55 55 56 56 #define US_DEBUGPX(fmt, ...) printk(fmt, ##__VA_ARGS__) 57 57 #define US_DEBUG(x) x 58 58 #else 59 59 __printf(2, 3) 60 - static inline int _usb_stor_dbg(const struct us_data *us, 61 - const char *fmt, ...) {return 1;} 60 + static inline void _usb_stor_dbg(const struct us_data *us, 61 + const char *fmt, ...) 62 + { 63 + } 62 64 #define usb_stor_dbg(us, fmt, ...) \ 63 65 do { if (0) _usb_stor_dbg(us, fmt, ##__VA_ARGS__); } while (0) 64 66 #define US_DEBUGPX(fmt, ...) \