1. 05 6月, 2019 2 次提交
  2. 31 5月, 2019 5 次提交
  3. 24 5月, 2019 2 次提交
  4. 21 5月, 2019 5 次提交
  5. 11 5月, 2019 1 次提交
    • P
      net: wireless: mt76: fix similar warning reported by kbuild test robot · 1b9705d9
      Petr Štetiar 提交于
      This patch fixes following (similar) warning reported by kbuild test robot:
      
       In function ‘memcpy’,
        inlined from ‘smsc75xx_init_mac_address’ at drivers/net/usb/smsc75xx.c:778:3,
        inlined from ‘smsc75xx_bind’ at drivers/net/usb/smsc75xx.c:1501:2:
        ./include/linux/string.h:355:9: warning: argument 2 null where non-null expected [-Wnonnull]
        return __builtin_memcpy(p, q, size);
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
        drivers/net/usb/smsc75xx.c: In function ‘smsc75xx_bind’:
        ./include/linux/string.h:355:9: note: in a call to built-in function ‘__builtin_memcpy’
      
      I've replaced the offending memcpy with ether_addr_copy, because I'm
      100% sure, that of_get_mac_address can't return NULL as it returns valid
      pointer or ERR_PTR encoded value, nothing else.
      
      I'm hesitant to just change IS_ERR into IS_ERR_OR_NULL check, as this
      would make the warning disappear also, but it would be confusing to
      check for impossible return value just to make a compiler happy.
      
      I'm now changing all occurencies of memcpy to ether_addr_copy after the
      of_get_mac_address call, as it's very likely, that we're going to get
      similar reports from kbuild test robot in the future.
      
      Fixes: d31a36b5 ("net: wireless: support of_get_mac_address new ERR_PTR error")
      Reported-by: Nkbuild test robot <lkp@intel.com>
      Signed-off-by: NPetr Štetiar <ynezz@true.cz>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1b9705d9
  6. 06 5月, 2019 1 次提交
  7. 03 5月, 2019 2 次提交
  8. 02 5月, 2019 2 次提交
    • G
      rtw88: phy: mark expected switch fall-throughs · aa8eaaaa
      Gustavo A. R. Silva 提交于
      In preparation to enabling -Wimplicit-fallthrough, mark switch
      cases where we are expecting to fall through.
      
      This patch fixes the following warnings:
      
      drivers/net/wireless/realtek/rtw88/phy.c: In function ‘rtw_get_channel_group’:
      ./include/linux/compiler.h:77:22: warning: this statement may fall through [-Wimplicit-fallthrough=]
       # define unlikely(x) __builtin_expect(!!(x), 0)
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~
      ./include/asm-generic/bug.h:125:2: note: in expansion of macro ‘unlikely’
        unlikely(__ret_warn_on);     \
        ^~~~~~~~
      drivers/net/wireless/realtek/rtw88/phy.c:907:3: note: in expansion of macro ‘WARN_ON’
         WARN_ON(1);
         ^~~~~~~
      drivers/net/wireless/realtek/rtw88/phy.c:908:2: note: here
        case 1:
        ^~~~
      In file included from ./include/linux/bcd.h:5,
                       from drivers/net/wireless/realtek/rtw88/phy.c:5:
      drivers/net/wireless/realtek/rtw88/phy.c: In function ‘phy_get_2g_tx_power_index’:
      ./include/linux/compiler.h:77:22: warning: this statement may fall through [-Wimplicit-fallthrough=]
       # define unlikely(x) __builtin_expect(!!(x), 0)
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~
      ./include/asm-generic/bug.h:125:2: note: in expansion of macro ‘unlikely’
        unlikely(__ret_warn_on);     \
        ^~~~~~~~
      drivers/net/wireless/realtek/rtw88/phy.c:1021:3: note: in expansion of macro ‘WARN_ON’
         WARN_ON(1);
         ^~~~~~~
      drivers/net/wireless/realtek/rtw88/phy.c:1022:2: note: here
        case RTW_CHANNEL_WIDTH_20:
        ^~~~
      
      Warning level 3 was used: -Wimplicit-fallthrough=3
      
      This patch is part of the ongoing efforts to enable
      -Wimplicit-fallthrough.
      Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      aa8eaaaa
    • C
      rtw88: fix shift of more than 32 bits of a integer · b85bd9a1
      Colin Ian King 提交于
      Currently the shift of an integer value more than 32 bits can
      occur when nss is more than 32.  Fix this by making the integer
      constants unsigned long longs before shifting and bit-wise or'ing
      with the u64 ra_mask to avoid the undefined shift behaviour.
      
      Addresses-Coverity: ("Bad shift operation")
      Fixes: e3037485 ("rtw88: new Realtek 802.11ac driver")
      Signed-off-by: NColin Ian King <colin.king@canonical.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      b85bd9a1
  9. 01 5月, 2019 20 次提交