2022-07-04 07:49:02

by Felix Fietkau

[permalink] [raw]
Subject: [PATCH] mt76: remove q->qid

It is no longer used

Signed-off-by: Felix Fietkau <[email protected]>
---
drivers/net/wireless/mediatek/mt76/mt76.h | 3 ---
drivers/net/wireless/mediatek/mt76/sdio.c | 2 --
drivers/net/wireless/mediatek/mt76/usb.c | 1 -
3 files changed, 6 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt76.h b/drivers/net/wireless/mediatek/mt76/mt76.h
index cb712c0438c2..f25f2dad43d8 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76.h
+++ b/drivers/net/wireless/mediatek/mt76/mt76.h
@@ -185,7 +185,6 @@ struct mt76_queue {

u8 buf_offset;
u8 hw_idx;
- u8 qid;
u8 flags;

u32 wed_regs;
@@ -977,7 +976,6 @@ static inline int mt76_init_tx_queue(struct mt76_phy *phy, int qid, int idx,
if (IS_ERR(q))
return PTR_ERR(q);

- q->qid = qid;
phy->q_tx[qid] = q;

return 0;
@@ -992,7 +990,6 @@ static inline int mt76_init_mcu_queue(struct mt76_dev *dev, int qid, int idx,
if (IS_ERR(q))
return PTR_ERR(q);

- q->qid = __MT_TXQ_MAX + qid;
dev->q_mcu[qid] = q;

return 0;
diff --git a/drivers/net/wireless/mediatek/mt76/sdio.c b/drivers/net/wireless/mediatek/mt76/sdio.c
index 974fdbf0ffab..aba2a9865821 100644
--- a/drivers/net/wireless/mediatek/mt76/sdio.c
+++ b/drivers/net/wireless/mediatek/mt76/sdio.c
@@ -350,7 +350,6 @@ int mt76s_alloc_tx(struct mt76_dev *dev)
if (IS_ERR(q))
return PTR_ERR(q);

- q->qid = i;
dev->phy.q_tx[i] = q;
}

@@ -358,7 +357,6 @@ int mt76s_alloc_tx(struct mt76_dev *dev)
if (IS_ERR(q))
return PTR_ERR(q);

- q->qid = MT_MCUQ_WM;
dev->q_mcu[MT_MCUQ_WM] = q;

return 0;
diff --git a/drivers/net/wireless/mediatek/mt76/usb.c b/drivers/net/wireless/mediatek/mt76/usb.c
index b030b567989b..6b8964c19f50 100644
--- a/drivers/net/wireless/mediatek/mt76/usb.c
+++ b/drivers/net/wireless/mediatek/mt76/usb.c
@@ -937,7 +937,6 @@ static int mt76u_alloc_tx(struct mt76_dev *dev)

spin_lock_init(&q->lock);
q->hw_idx = mt76u_ac_to_hwq(dev, i);
- q->qid = i;

dev->phy.q_tx[i] = q;

--
2.36.1


2022-07-04 13:38:23

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH] mt76: remove q->qid

Hi Felix,

I love your patch! Yet something to improve:

[auto build test ERROR on wireless-next/main]
[also build test ERROR on wireless/main linus/master v5.19-rc5 next-20220704]
[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/intel-lab-lkp/linux/commits/Felix-Fietkau/mt76-remove-q-qid/20220704-154431
base: https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless-next.git main
config: i386-allyesconfig (https://download.01.org/0day-ci/archive/20220704/[email protected]/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce (this is a W=1 build):
# https://github.com/intel-lab-lkp/linux/commit/7cef83a2b5a0f3c5ca3612e34ca2649ac9cf75f4
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Felix-Fietkau/mt76-remove-q-qid/20220704-154431
git checkout 7cef83a2b5a0f3c5ca3612e34ca2649ac9cf75f4
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <[email protected]>

All errors (new ones prefixed by >>):

drivers/net/wireless/mediatek/mt76/usb.c: In function 'mt76u_tx_queue_skb':
>> drivers/net/wireless/mediatek/mt76/usb.c:861:52: error: 'struct mt76_queue' has no member named 'qid'
861 | err = dev->drv->tx_prepare_skb(dev, NULL, q->qid, wcid, sta, &tx_info);
| ^~
--
drivers/net/wireless/mediatek/mt76/sdio.c: In function 'mt76s_tx_queue_skb':
>> drivers/net/wireless/mediatek/mt76/sdio.c:531:52: error: 'struct mt76_queue' has no member named 'qid'
531 | err = dev->drv->tx_prepare_skb(dev, NULL, q->qid, wcid, sta, &tx_info);
| ^~
--
drivers/net/wireless/mediatek/mt76/dma.c: In function 'mt76_dma_tx_queue_skb':
>> drivers/net/wireless/mediatek/mt76/dma.c:409:52: error: 'struct mt76_queue' has no member named 'qid'
409 | ret = dev->drv->tx_prepare_skb(dev, txwi, q->qid, wcid, sta, &tx_info);
| ^~


vim +861 drivers/net/wireless/mediatek/mt76/usb.c

b40b15e1521f77 Lorenzo Bianconi 2018-07-31 845
b40b15e1521f77 Lorenzo Bianconi 2018-07-31 846 static int
8987059475f503 Lorenzo Bianconi 2020-11-11 847 mt76u_tx_queue_skb(struct mt76_dev *dev, struct mt76_queue *q,
b40b15e1521f77 Lorenzo Bianconi 2018-07-31 848 struct sk_buff *skb, struct mt76_wcid *wcid,
b40b15e1521f77 Lorenzo Bianconi 2018-07-31 849 struct ieee80211_sta *sta)
b40b15e1521f77 Lorenzo Bianconi 2018-07-31 850 {
cfaae9e67cf130 Lorenzo Bianconi 2019-04-02 851 struct mt76_tx_info tx_info = {
cfaae9e67cf130 Lorenzo Bianconi 2019-04-02 852 .skb = skb,
cfaae9e67cf130 Lorenzo Bianconi 2019-04-02 853 };
95f61e17eff3d9 Felix Fietkau 2020-08-23 854 u16 idx = q->head;
b40b15e1521f77 Lorenzo Bianconi 2018-07-31 855 int err;
b40b15e1521f77 Lorenzo Bianconi 2018-07-31 856
b40b15e1521f77 Lorenzo Bianconi 2018-07-31 857 if (q->queued == q->ndesc)
b40b15e1521f77 Lorenzo Bianconi 2018-07-31 858 return -ENOSPC;
b40b15e1521f77 Lorenzo Bianconi 2018-07-31 859
88046b2c9f6d8b Felix Fietkau 2018-10-25 860 skb->prev = skb->next = NULL;
8987059475f503 Lorenzo Bianconi 2020-11-11 @861 err = dev->drv->tx_prepare_skb(dev, NULL, q->qid, wcid, sta, &tx_info);
b40b15e1521f77 Lorenzo Bianconi 2018-07-31 862 if (err < 0)
b40b15e1521f77 Lorenzo Bianconi 2018-07-31 863 return err;
b40b15e1521f77 Lorenzo Bianconi 2018-07-31 864
cfaae9e67cf130 Lorenzo Bianconi 2019-04-02 865 err = mt76u_tx_setup_buffers(dev, tx_info.skb, q->entry[idx].urb);
b40b15e1521f77 Lorenzo Bianconi 2018-07-31 866 if (err < 0)
b40b15e1521f77 Lorenzo Bianconi 2018-07-31 867 return err;
b40b15e1521f77 Lorenzo Bianconi 2018-07-31 868
4de92bf10c6df6 Lorenzo Bianconi 2019-02-20 869 mt76u_fill_bulk_urb(dev, USB_DIR_OUT, q2ep(q->hw_idx),
cfaae9e67cf130 Lorenzo Bianconi 2019-04-02 870 q->entry[idx].urb, mt76u_complete_tx,
cfaae9e67cf130 Lorenzo Bianconi 2019-04-02 871 &q->entry[idx]);
b40b15e1521f77 Lorenzo Bianconi 2018-07-31 872
95f61e17eff3d9 Felix Fietkau 2020-08-23 873 q->head = (q->head + 1) % q->ndesc;
cfaae9e67cf130 Lorenzo Bianconi 2019-04-02 874 q->entry[idx].skb = tx_info.skb;
6d51cae28c8de9 Felix Fietkau 2021-05-09 875 q->entry[idx].wcid = 0xffff;
b40b15e1521f77 Lorenzo Bianconi 2018-07-31 876 q->queued++;
b40b15e1521f77 Lorenzo Bianconi 2018-07-31 877
b40b15e1521f77 Lorenzo Bianconi 2018-07-31 878 return idx;
b40b15e1521f77 Lorenzo Bianconi 2018-07-31 879 }
b40b15e1521f77 Lorenzo Bianconi 2018-07-31 880

--
0-DAY CI Kernel Test Service
https://01.org/lkp