lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <201909220123.LePmci49%lkp@intel.com>
Date:   Sun, 22 Sep 2019 01:13:27 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Ryder Lee <ryder.lee@...iatek.com>
Cc:     kbuild-all@...org, linux-kernel@...r.kernel.org,
        Felix Fietkau <nbd@....name>
Subject: drivers/net/wireless/mediatek/mt76/mt7615/mac.c:18:10: note: in
 expansion of macro 'FIELD_GET'

tree:   https://kernel.googlesource.com/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   f97c81dc6ca5996560b3944064f63fc87eb18d00
commit: bf92e76851009e6bf082db9e9de9b0ab9320cf26 mt76: mt7615: add support for per-chain signal strength reporting
date:   3 months ago
config: x86_64-randconfig-g003-201938 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-13) 7.4.0
reproduce:
        git checkout bf92e76851009e6bf082db9e9de9b0ab9320cf26
        # save the attached .config to linux build tree
        make ARCH=x86_64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@...el.com>

All error/warnings (new ones prefixed by >>):

   Cyclomatic Complexity 5 include/linux/compiler.h:__read_once_size
   Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:constant_test_bit
   Cyclomatic Complexity 1 arch/x86/include/asm/arch_hweight.h:__arch_hweight32
   Cyclomatic Complexity 1 arch/x86/include/asm/arch_hweight.h:__arch_hweight8
   Cyclomatic Complexity 5 arch/x86/include/asm/preempt.h:__preempt_count_add
   Cyclomatic Complexity 5 arch/x86/include/asm/preempt.h:__preempt_count_sub
   Cyclomatic Complexity 1 include/linux/spinlock.h:spin_lock_bh
   Cyclomatic Complexity 1 include/linux/spinlock.h:spin_unlock_bh
   Cyclomatic Complexity 1 include/linux/rcupdate.h:__rcu_read_lock
   Cyclomatic Complexity 1 include/linux/rcupdate.h:__rcu_read_unlock
   Cyclomatic Complexity 1 include/linux/rcutiny.h:rcu_is_watching
   Cyclomatic Complexity 1 include/linux/dma-debug.h:debug_dma_unmap_page
   Cyclomatic Complexity 1 include/linux/dma-mapping.h:valid_dma_direction
   Cyclomatic Complexity 1 arch/x86/include/asm/dma-mapping.h:get_arch_dma_ops
   Cyclomatic Complexity 2 include/linux/dma-mapping.h:get_dma_ops
   Cyclomatic Complexity 1 include/linux/skbuff.h:skb_get_queue_mapping
   Cyclomatic Complexity 1 include/linux/etherdevice.h:is_multicast_ether_addr
   Cyclomatic Complexity 1 include/linux/ieee80211.h:ieee80211_has_a4
   Cyclomatic Complexity 1 include/linux/ieee80211.h:ieee80211_is_mgmt
   Cyclomatic Complexity 1 include/linux/ieee80211.h:ieee80211_is_data
   Cyclomatic Complexity 1 include/linux/ieee80211.h:ieee80211_is_data_qos
   Cyclomatic Complexity 1 include/linux/ieee80211.h:ieee80211_is_beacon
   Cyclomatic Complexity 1 include/linux/ieee80211.h:ieee80211_is_back_req
   Cyclomatic Complexity 1 include/linux/ieee80211.h:ieee80211_is_qos_nullfunc
   Cyclomatic Complexity 2 include/linux/ieee80211.h:ieee80211_get_qos_ctl
   Cyclomatic Complexity 1 include/net/mac80211.h:ieee80211_rate_get_vht_mcs
   Cyclomatic Complexity 1 include/net/mac80211.h:ieee80211_rate_get_vht_nss
   Cyclomatic Complexity 1 include/net/mac80211.h:IEEE80211_SKB_CB
   Cyclomatic Complexity 1 drivers/net/wireless/mediatek/mt76/mt7615/../mt76.h:mt76_get_txwi_ptr
   Cyclomatic Complexity 3 drivers/net/wireless/mediatek/mt76/mt7615/../mt76.h:wcid_to_sta
   Cyclomatic Complexity 2 include/net/mac80211.h:ieee80211_tx_info_clear_status
   Cyclomatic Complexity 21 drivers/net/wireless/mediatek/mt76/mt7615/mac.c:mt7615_fill_txs
   Cyclomatic Complexity 8 drivers/net/wireless/mediatek/mt76/mt7615/mac.c:mt7615_rx_get_wcid
   Cyclomatic Complexity 4 drivers/net/wireless/mediatek/mt76/mt7615/mac.c:to_rssi
   Cyclomatic Complexity 1 include/linux/netdevice.h:dev_kfree_skb_any
   Cyclomatic Complexity 1 include/linux/dma-mapping.h:dma_is_direct
   Cyclomatic Complexity 3 include/linux/dma-mapping.h:dma_unmap_page_attrs
   Cyclomatic Complexity 1 include/linux/dma-mapping.h:dma_unmap_single_attrs
   Cyclomatic Complexity 1 include/linux/rcupdate.h:rcu_lock_acquire
   Cyclomatic Complexity 4 include/linux/rcupdate.h:rcu_read_lock
   Cyclomatic Complexity 6 drivers/net/wireless/mediatek/mt76/mt7615/mac.c:mt7615_mac_add_txs_skb
   Cyclomatic Complexity 1 include/net/mac80211.h:ieee80211_tx_status_noskb
   Cyclomatic Complexity 1 include/linux/rcupdate.h:rcu_lock_release
   Cyclomatic Complexity 4 include/linux/rcupdate.h:rcu_read_unlock
   Cyclomatic Complexity 37 drivers/net/wireless/mediatek/mt76/mt7615/mac.c:mt7615_mac_fill_rx
   Cyclomatic Complexity 1 drivers/net/wireless/mediatek/mt76/mt7615/mac.c:mt7615_sta_ps
   Cyclomatic Complexity 5 drivers/net/wireless/mediatek/mt76/mt7615/mac.c:mt7615_tx_complete_skb
   Cyclomatic Complexity 16 drivers/net/wireless/mediatek/mt76/mt7615/mac.c:mt7615_mac_tx_rate_val
   Cyclomatic Complexity 47 drivers/net/wireless/mediatek/mt76/mt7615/mac.c:mt7615_mac_write_txwi
   Cyclomatic Complexity 2 drivers/net/wireless/mediatek/mt76/mt7615/mac.c:mt7615_txp_skb_unmap
   Cyclomatic Complexity 8 drivers/net/wireless/mediatek/mt76/mt7615/mac.c:mt7615_tx_prepare_skb
   Cyclomatic Complexity 10 drivers/net/wireless/mediatek/mt76/mt7615/mac.c:mt7615_mac_add_txs
   Cyclomatic Complexity 4 drivers/net/wireless/mediatek/mt76/mt7615/mac.c:mt7615_mac_tx_free
   Cyclomatic Complexity 1 drivers/net/wireless/mediatek/mt76/mt7615/mac.c:mt7615_mac_work
   Cyclomatic Complexity 1 drivers/net/wireless/mediatek/mt76/mt7615/mac.c:_GLOBAL__sub_I_00100_0_mt7615_mac_fill_rx
   Cyclomatic Complexity 1 drivers/net/wireless/mediatek/mt76/mt7615/mac.c:_GLOBAL__sub_D_00100_1_mt7615_mac_fill_rx
   In file included from include/linux/export.h:45:0,
                    from include/linux/linkage.h:7,
                    from include/linux/kernel.h:8,
                    from include/linux/skbuff.h:17,
                    from include/linux/if_ether.h:23,
                    from include/linux/etherdevice.h:25,
                    from drivers/net/wireless/mediatek/mt76/mt7615/mac.c:10:
   drivers/net/wireless/mediatek/mt76/mt7615/mac.c: In function 'to_rssi':
>> include/linux/compiler.h:345:38: error: call to '__compiletime_assert_18' declared with attribute error: BUILD_BUG_ON failed: (((field) + (1ULL << (__builtin_ffsll(field) - 1))) & (((field) + (1ULL << (__builtin_ffsll(field) - 1))) - 1)) != 0
     _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
                                         ^
   include/linux/compiler.h:326:4: note: in definition of macro '__compiletime_assert'
       prefix ## suffix();    \
       ^~~~~~
   include/linux/compiler.h:345:2: note: in expansion of macro '_compiletime_assert'
     _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
     ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
    #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                        ^~~~~~~~~~~~~~~~~~
>> include/linux/bitfield.h:54:3: note: in expansion of macro 'BUILD_BUG_ON_MSG'
      BUILD_BUG_ON_MSG(!__builtin_constant_p(_mask),  \
      ^~~~~~~~~~~~~~~~
>> include/linux/bitfield.h:103:3: note: in expansion of macro '__BF_FIELD_CHECK'
      __BF_FIELD_CHECK(_mask, _reg, 0U, "FIELD_GET: "); \
      ^~~~~~~~~~~~~~~~
>> drivers/net/wireless/mediatek/mt76/mt7615/mac.c:18:10: note: in expansion of macro 'FIELD_GET'
     return (FIELD_GET(field, rxv) - 220) / 2;
             ^~~~~~~~~
>> include/linux/compiler.h:345:38: error: call to '__compiletime_assert_18' declared with attribute error: BUILD_BUG_ON failed: (((field) + (1ULL << (__builtin_ffsll(field) - 1))) & (((field) + (1ULL << (__builtin_ffsll(field) - 1))) - 1)) != 0
     _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
                                         ^
   include/linux/compiler.h:326:4: note: in definition of macro '__compiletime_assert'
       prefix ## suffix();    \
       ^~~~~~
   include/linux/compiler.h:345:2: note: in expansion of macro '_compiletime_assert'
     _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
     ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
    #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                        ^~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
     BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
     ^~~~~~~~~~~~~~~~
>> include/linux/build_bug.h:21:2: note: in expansion of macro 'BUILD_BUG_ON'
     BUILD_BUG_ON(((n) & ((n) - 1)) != 0)
     ^~~~~~~~~~~~
>> include/linux/bitfield.h:62:3: note: in expansion of macro '__BUILD_BUG_ON_NOT_POWER_OF_2'
      __BUILD_BUG_ON_NOT_POWER_OF_2((_mask) +   \
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/bitfield.h:103:3: note: in expansion of macro '__BF_FIELD_CHECK'
      __BF_FIELD_CHECK(_mask, _reg, 0U, "FIELD_GET: "); \
      ^~~~~~~~~~~~~~~~
>> drivers/net/wireless/mediatek/mt76/mt7615/mac.c:18:10: note: in expansion of macro 'FIELD_GET'
     return (FIELD_GET(field, rxv) - 220) / 2;
             ^~~~~~~~~
--
   Cyclomatic Complexity 5 include/linux/compiler.h:__read_once_size
   Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:constant_test_bit
   Cyclomatic Complexity 1 arch/x86/include/asm/arch_hweight.h:__arch_hweight32
   Cyclomatic Complexity 1 arch/x86/include/asm/arch_hweight.h:__arch_hweight8
   Cyclomatic Complexity 5 arch/x86/include/asm/preempt.h:__preempt_count_add
   Cyclomatic Complexity 5 arch/x86/include/asm/preempt.h:__preempt_count_sub
   Cyclomatic Complexity 1 include/linux/spinlock.h:spin_lock_bh
   Cyclomatic Complexity 1 include/linux/spinlock.h:spin_unlock_bh
   Cyclomatic Complexity 1 include/linux/rcupdate.h:__rcu_read_lock
   Cyclomatic Complexity 1 include/linux/rcupdate.h:__rcu_read_unlock
   Cyclomatic Complexity 1 include/linux/rcutiny.h:rcu_is_watching
   Cyclomatic Complexity 1 include/linux/dma-debug.h:debug_dma_unmap_page
   Cyclomatic Complexity 1 include/linux/dma-mapping.h:valid_dma_direction
   Cyclomatic Complexity 1 arch/x86/include/asm/dma-mapping.h:get_arch_dma_ops
   Cyclomatic Complexity 2 include/linux/dma-mapping.h:get_dma_ops
   Cyclomatic Complexity 1 include/linux/skbuff.h:skb_get_queue_mapping
   Cyclomatic Complexity 1 include/linux/etherdevice.h:is_multicast_ether_addr
   Cyclomatic Complexity 1 include/linux/ieee80211.h:ieee80211_has_a4
   Cyclomatic Complexity 1 include/linux/ieee80211.h:ieee80211_is_mgmt
   Cyclomatic Complexity 1 include/linux/ieee80211.h:ieee80211_is_data
   Cyclomatic Complexity 1 include/linux/ieee80211.h:ieee80211_is_data_qos
   Cyclomatic Complexity 1 include/linux/ieee80211.h:ieee80211_is_beacon
   Cyclomatic Complexity 1 include/linux/ieee80211.h:ieee80211_is_back_req
   Cyclomatic Complexity 1 include/linux/ieee80211.h:ieee80211_is_qos_nullfunc
   Cyclomatic Complexity 2 include/linux/ieee80211.h:ieee80211_get_qos_ctl
   Cyclomatic Complexity 1 include/net/mac80211.h:ieee80211_rate_get_vht_mcs
   Cyclomatic Complexity 1 include/net/mac80211.h:ieee80211_rate_get_vht_nss
   Cyclomatic Complexity 1 include/net/mac80211.h:IEEE80211_SKB_CB
   Cyclomatic Complexity 1 drivers/net/wireless//mediatek/mt76/mt7615/../mt76.h:mt76_get_txwi_ptr
   Cyclomatic Complexity 3 drivers/net/wireless//mediatek/mt76/mt7615/../mt76.h:wcid_to_sta
   Cyclomatic Complexity 2 include/net/mac80211.h:ieee80211_tx_info_clear_status
   Cyclomatic Complexity 21 drivers/net/wireless//mediatek/mt76/mt7615/mac.c:mt7615_fill_txs
   Cyclomatic Complexity 8 drivers/net/wireless//mediatek/mt76/mt7615/mac.c:mt7615_rx_get_wcid
   Cyclomatic Complexity 4 drivers/net/wireless//mediatek/mt76/mt7615/mac.c:to_rssi
   Cyclomatic Complexity 1 include/linux/netdevice.h:dev_kfree_skb_any
   Cyclomatic Complexity 1 include/linux/dma-mapping.h:dma_is_direct
   Cyclomatic Complexity 3 include/linux/dma-mapping.h:dma_unmap_page_attrs
   Cyclomatic Complexity 1 include/linux/dma-mapping.h:dma_unmap_single_attrs
   Cyclomatic Complexity 1 include/linux/rcupdate.h:rcu_lock_acquire
   Cyclomatic Complexity 4 include/linux/rcupdate.h:rcu_read_lock
   Cyclomatic Complexity 6 drivers/net/wireless//mediatek/mt76/mt7615/mac.c:mt7615_mac_add_txs_skb
   Cyclomatic Complexity 1 include/net/mac80211.h:ieee80211_tx_status_noskb
   Cyclomatic Complexity 1 include/linux/rcupdate.h:rcu_lock_release
   Cyclomatic Complexity 4 include/linux/rcupdate.h:rcu_read_unlock
   Cyclomatic Complexity 37 drivers/net/wireless//mediatek/mt76/mt7615/mac.c:mt7615_mac_fill_rx
   Cyclomatic Complexity 1 drivers/net/wireless//mediatek/mt76/mt7615/mac.c:mt7615_sta_ps
   Cyclomatic Complexity 5 drivers/net/wireless//mediatek/mt76/mt7615/mac.c:mt7615_tx_complete_skb
   Cyclomatic Complexity 16 drivers/net/wireless//mediatek/mt76/mt7615/mac.c:mt7615_mac_tx_rate_val
   Cyclomatic Complexity 47 drivers/net/wireless//mediatek/mt76/mt7615/mac.c:mt7615_mac_write_txwi
   Cyclomatic Complexity 2 drivers/net/wireless//mediatek/mt76/mt7615/mac.c:mt7615_txp_skb_unmap
   Cyclomatic Complexity 8 drivers/net/wireless//mediatek/mt76/mt7615/mac.c:mt7615_tx_prepare_skb
   Cyclomatic Complexity 10 drivers/net/wireless//mediatek/mt76/mt7615/mac.c:mt7615_mac_add_txs
   Cyclomatic Complexity 4 drivers/net/wireless//mediatek/mt76/mt7615/mac.c:mt7615_mac_tx_free
   Cyclomatic Complexity 1 drivers/net/wireless//mediatek/mt76/mt7615/mac.c:mt7615_mac_work
   Cyclomatic Complexity 1 drivers/net/wireless//mediatek/mt76/mt7615/mac.c:_GLOBAL__sub_I_00100_0_mt7615_mac_fill_rx
   Cyclomatic Complexity 1 drivers/net/wireless//mediatek/mt76/mt7615/mac.c:_GLOBAL__sub_D_00100_1_mt7615_mac_fill_rx
   In file included from include/linux/export.h:45:0,
                    from include/linux/linkage.h:7,
                    from include/linux/kernel.h:8,
                    from include/linux/skbuff.h:17,
                    from include/linux/if_ether.h:23,
                    from include/linux/etherdevice.h:25,
                    from drivers/net/wireless//mediatek/mt76/mt7615/mac.c:10:
   drivers/net/wireless//mediatek/mt76/mt7615/mac.c: In function 'to_rssi':
>> include/linux/compiler.h:345:38: error: call to '__compiletime_assert_18' declared with attribute error: BUILD_BUG_ON failed: (((field) + (1ULL << (__builtin_ffsll(field) - 1))) & (((field) + (1ULL << (__builtin_ffsll(field) - 1))) - 1)) != 0
     _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
                                         ^
   include/linux/compiler.h:326:4: note: in definition of macro '__compiletime_assert'
       prefix ## suffix();    \
       ^~~~~~
   include/linux/compiler.h:345:2: note: in expansion of macro '_compiletime_assert'
     _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
     ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
    #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                        ^~~~~~~~~~~~~~~~~~
>> include/linux/bitfield.h:54:3: note: in expansion of macro 'BUILD_BUG_ON_MSG'
      BUILD_BUG_ON_MSG(!__builtin_constant_p(_mask),  \
      ^~~~~~~~~~~~~~~~
>> include/linux/bitfield.h:103:3: note: in expansion of macro '__BF_FIELD_CHECK'
      __BF_FIELD_CHECK(_mask, _reg, 0U, "FIELD_GET: "); \
      ^~~~~~~~~~~~~~~~
   drivers/net/wireless//mediatek/mt76/mt7615/mac.c:18:10: note: in expansion of macro 'FIELD_GET'
     return (FIELD_GET(field, rxv) - 220) / 2;
             ^~~~~~~~~
>> include/linux/compiler.h:345:38: error: call to '__compiletime_assert_18' declared with attribute error: BUILD_BUG_ON failed: (((field) + (1ULL << (__builtin_ffsll(field) - 1))) & (((field) + (1ULL << (__builtin_ffsll(field) - 1))) - 1)) != 0
     _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
                                         ^
   include/linux/compiler.h:326:4: note: in definition of macro '__compiletime_assert'
       prefix ## suffix();    \
       ^~~~~~
   include/linux/compiler.h:345:2: note: in expansion of macro '_compiletime_assert'
     _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
     ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
    #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
                                        ^~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:50:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
     BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
     ^~~~~~~~~~~~~~~~
>> include/linux/build_bug.h:21:2: note: in expansion of macro 'BUILD_BUG_ON'
     BUILD_BUG_ON(((n) & ((n) - 1)) != 0)
     ^~~~~~~~~~~~
>> include/linux/bitfield.h:62:3: note: in expansion of macro '__BUILD_BUG_ON_NOT_POWER_OF_2'
      __BUILD_BUG_ON_NOT_POWER_OF_2((_mask) +   \
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> include/linux/bitfield.h:103:3: note: in expansion of macro '__BF_FIELD_CHECK'
      __BF_FIELD_CHECK(_mask, _reg, 0U, "FIELD_GET: "); \
      ^~~~~~~~~~~~~~~~
   drivers/net/wireless//mediatek/mt76/mt7615/mac.c:18:10: note: in expansion of macro 'FIELD_GET'
     return (FIELD_GET(field, rxv) - 220) / 2;
             ^~~~~~~~~

vim +/FIELD_GET +18 drivers/net/wireless/mediatek/mt76/mt7615/mac.c

    15	
    16	static inline s8 to_rssi(u32 field, u32 rxv)
    17	{
  > 18		return (FIELD_GET(field, rxv) - 220) / 2;
    19	}
    20	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Download attachment ".config.gz" of type "application/gzip" (32940 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ