Message ID | 20211223011358.4031459-33-davidm@egauge.net |
---|---|
State | New |
Headers | show |
Series | wilc1000: rework tx path to use sk_buffs throughout | expand |
Hi David, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on kvalo-wireless-drivers-next/master] [also build test WARNING on kvalo-wireless-drivers/master v5.16-rc7 next-20211224] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/David-Mosberger-Tang/wilc1000-rework-tx-path-to-use-sk_buffs-throughout/20211223-091915 base: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git master config: sparc-randconfig-s031-20211228 (https://download.01.org/0day-ci/archive/20211228/202112282030.iPTnhHRr-lkp@intel.com/config) compiler: sparc64-linux-gcc (GCC) 11.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # apt-get install sparse # sparse version: v0.6.4-dirty # https://github.com/0day-ci/linux/commit/9339519807fd005c22f3299f859edc615e540d3f git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review David-Mosberger-Tang/wilc1000-rework-tx-path-to-use-sk_buffs-throughout/20211223-091915 git checkout 9339519807fd005c22f3299f859edc615e540d3f # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=sparc SHELL=/bin/bash drivers/net/wireless/microchip/wilc1000/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> sparse warnings: (new ones prefixed by >>) >> drivers/net/wireless/microchip/wilc1000/wlan.c:640:16: sparse: sparse: incorrect type in return expression (different base types) @@ expected unsigned int @@ got restricted __le32 [usertype] @@ drivers/net/wireless/microchip/wilc1000/wlan.c:640:16: sparse: expected unsigned int drivers/net/wireless/microchip/wilc1000/wlan.c:640:16: sparse: got restricted __le32 [usertype] vim +640 drivers/net/wireless/microchip/wilc1000/wlan.c 631 632 static u32 vmm_table_entry(struct sk_buff *tqe, u32 vmm_sz) 633 { 634 struct wilc_skb_tx_cb *tx_cb = WILC_SKB_TX_CB(tqe); 635 u32 entry; 636 637 entry = vmm_sz / 4; 638 if (tx_cb->type == WILC_CFG_PKT) 639 entry |= WILC_VMM_CFG_PKT; > 640 return cpu_to_le32(entry); 641 } 642 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
diff --git a/drivers/net/wireless/microchip/wilc1000/wlan.c b/drivers/net/wireless/microchip/wilc1000/wlan.c index cff70f7d38c89..5939ed5b2db68 100644 --- a/drivers/net/wireless/microchip/wilc1000/wlan.c +++ b/drivers/net/wireless/microchip/wilc1000/wlan.c @@ -629,6 +629,17 @@ static u32 tx_hdr_len(u8 type) } } +static u32 vmm_table_entry(struct sk_buff *tqe, u32 vmm_sz) +{ + struct wilc_skb_tx_cb *tx_cb = WILC_SKB_TX_CB(tqe); + u32 entry; + + entry = vmm_sz / 4; + if (tx_cb->type == WILC_CFG_PKT) + entry |= WILC_VMM_CFG_PKT; + return cpu_to_le32(entry); +} + /** * fill_vmm_table() - Fill VMM table with packets to be sent * @wilc: Pointer to the wilc structure. @@ -691,11 +702,7 @@ static int fill_vmm_table(const struct wilc *wilc, if (sum + vmm_sz > WILC_TX_BUFF_SIZE) goto out; - vmm_table[i] = vmm_sz / 4; - if (tx_cb->type == WILC_CFG_PKT) - vmm_table[i] |= WILC_VMM_CFG_PKT; - - cpu_to_le32s(&vmm_table[i]); + vmm_table[i] = vmm_table_entry(tqe_q[ac], vmm_sz); vmm_entries_ac[i] = ac; i++;
This simplifies fill_vmm_table() a bit more and will become even more useful with the following patches. Signed-off-by: David Mosberger-Tang <davidm@egauge.net> --- drivers/net/wireless/microchip/wilc1000/wlan.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-)