Skip to content
  • Arnd Bergmann's avatar
    3eb631e3
    staging/rtl8192u: avoid Wempty-body warning · 3eb631e3
    Arnd Bergmann authored
    
    
    This driver has a few disabled diagnostics, which can probably
    just get removed, or might still be helpful:
    
    drivers/staging/rtl8192u/r8192U_core.c: In function 'rtl8192_set_rxconf':
    drivers/staging/rtl8192u/r8192U_core.c:767:45: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]
      767 |                 DMESG("NIC in promisc mode");
          |                                             ^
    drivers/staging/rtl8192u/r8192U_core.c: In function 'rtl819xusb_rx_command_packet':
    drivers/staging/rtl8192u/r8192U_core.c:883:80: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]
      883 |                 DMESG("rxcommandpackethandle819xusb: It is a command packet\n");
          |                                                                                ^
    
    Changing the empty macro to no_printk() to shut up the compiler warnings
    and add format string checking.
    
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Link: https://lore.kernel.org/r/20210322103545.704121-1-arnd@kernel.org
    
    
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    3eb631e3
    staging/rtl8192u: avoid Wempty-body warning
    Arnd Bergmann authored
    
    
    This driver has a few disabled diagnostics, which can probably
    just get removed, or might still be helpful:
    
    drivers/staging/rtl8192u/r8192U_core.c: In function 'rtl8192_set_rxconf':
    drivers/staging/rtl8192u/r8192U_core.c:767:45: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]
      767 |                 DMESG("NIC in promisc mode");
          |                                             ^
    drivers/staging/rtl8192u/r8192U_core.c: In function 'rtl819xusb_rx_command_packet':
    drivers/staging/rtl8192u/r8192U_core.c:883:80: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]
      883 |                 DMESG("rxcommandpackethandle819xusb: It is a command packet\n");
          |                                                                                ^
    
    Changing the empty macro to no_printk() to shut up the compiler warnings
    and add format string checking.
    
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Link: https://lore.kernel.org/r/20210322103545.704121-1-arnd@kernel.org
    
    
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Loading