1. 01 Oct, 2018 4 commits
    • Nathan Chancellor's avatar
      rtlwifi: btcoex: Use proper enumerated types for Wi-Fi only interface · 31138a82
      Nathan Chancellor authored
      Clang warns when one enumerated type is implicitly converted to another.
      
      drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c:1327:34:
      warning: implicit conversion from enumeration type 'enum
      btc_chip_interface' to different enumeration type 'enum
      wifionly_chip_interface' [-Wenum-conversion]
                      wifionly_cfg->chip_interface = BTC_INTF_PCI;
                                                   ~ ^~~~~~~~~~~~
      drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c:1330:34:
      warning: implicit conversion from enumeration type 'enum
      btc_chip_interface' to different enumeration type 'enum
      wifionly_chip_interface' [-Wenum-conversion]
                      wifionly_cfg->chip_interface = BTC_INTF_USB;
                                                   ~ ^~~~~~~~~~~~
      drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c:1333:34:
      warning: implicit conversion from enumeration type 'enum
      btc_chip_interface' to different enumeration type 'enum
      wifionly_chip_interface' [-Wenum-conversion]
                      wifionly_cfg->chip_interface = BTC_INTF_UNKNOWN;
                                                   ~ ^~~~~~~~~~~~~~~~
      3 warnings generated.
      
      Use the values from the correct enumerated type, wifionly_chip_interface.
      
      BTC_INTF_UNKNOWN = WIFIONLY_INTF_UNKNOWN = 0
      BTC_INTF_PCI = WIFIONLY_INTF_PCI = 1
      BTC_INTF_USB = WIFIONLY_INTF_USB = 2
      
      Link: https://github.com/ClangBuiltLinux/linux/issues/135Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
      Acked-by: default avatarPing-Ke Shih <pkshih@realtek.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      31138a82
    • Nathan Chancellor's avatar
      ath5k: Remove unused BUG_ON · 0891c7f4
      Nathan Chancellor authored
      Clang warns that the address of a pointer will always evaluated as true
      in a boolean context:
      
      drivers/net/wireless/ath/ath5k/debug.c:1031:14: warning: address of
      array 'ah->sbands' will always evaluate to 'true'
      [-Wpointer-bool-conversion]
              BUG_ON(!ah->sbands);
                     ~~~~~^~~~~~
      ./include/asm-generic/bug.h:61:45: note: expanded from macro 'BUG_ON'
      #define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
                                                  ^~~~~~~~~
      ./include/linux/compiler.h:77:42: note: expanded from macro 'unlikely'
      # define unlikely(x)    __builtin_expect(!!(x), 0)
                                                  ^
      1 warning generated.
      
      Given that this condition is always false because of the logical not,
      just remove it.
      
      Link: https://github.com/ClangBuiltLinux/linux/issues/130Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      0891c7f4
    • Nathan Chancellor's avatar
      rsi: Remove unnecessary boolean condition · f613e480
      Nathan Chancellor authored
      Clang warns that the address of a pointer will always evaluated as true
      in a boolean context.
      
      drivers/net/wireless/rsi/rsi_91x_mac80211.c:927:50: warning: address of
      array 'key->key' will always evaluate to 'true'
      [-Wpointer-bool-conversion]
              if (vif->type == NL80211_IFTYPE_STATION && key->key &&
                                                      ~~ ~~~~~^~~
      1 warning generated.
      
      Link: https://github.com/ClangBuiltLinux/linux/issues/136Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      f613e480
    • Nathan Chancellor's avatar
      ipw2x00: Remove unnecessary parentheses · c15ace86
      Nathan Chancellor authored
      Clang warns when multiple pairs of parentheses are used for a single
      conditional statement.
      
      drivers/net/wireless/intel/ipw2x00/ipw2200.c:5655:28: warning: equality
      comparison with extraneous parentheses [-Wparentheses-equality]
                      if ((priv->ieee->iw_mode == IW_MODE_ADHOC)) {
                           ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
      drivers/net/wireless/intel/ipw2x00/ipw2200.c:5655:28: note: remove
      extraneous parentheses around the comparison to silence this warning
                      if ((priv->ieee->iw_mode == IW_MODE_ADHOC)) {
                          ~                    ^               ~
      drivers/net/wireless/intel/ipw2x00/ipw2200.c:5655:28: note: use '=' to
      turn this equality comparison into an assignment
                      if ((priv->ieee->iw_mode == IW_MODE_ADHOC)) {
                                               ^~
                                               =
      1 warning generated.
      
      Link: https://github.com/ClangBuiltLinux/linux/issues/134Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      c15ace86
  2. 20 Sep, 2018 7 commits
  3. 19 Sep, 2018 29 commits