linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mt76: Fix queue ID variable types after mcu queue split
@ 2020-12-29 21:15 Nathan Chancellor
  2020-12-31 10:09 ` Lorenzo Bianconi
  2021-01-14 16:48 ` Kalle Valo
  0 siblings, 2 replies; 6+ messages in thread
From: Nathan Chancellor @ 2020-12-29 21:15 UTC (permalink / raw)
  To: Felix Fietkau, Lorenzo Bianconi
  Cc: Ryder Lee, Kalle Valo, linux-wireless, netdev, linux-mediatek,
	linux-kernel, clang-built-linux, Nathan Chancellor

Clang warns in both mt7615 and mt7915:

drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:271:9: warning: implicit
conversion from enumeration type 'enum mt76_mcuq_id' to different
enumeration type 'enum mt76_txq_id' [-Wenum-conversion]
                txq = MT_MCUQ_FWDL;
                    ~ ^~~~~~~~~~~~
drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:278:9: warning: implicit
conversion from enumeration type 'enum mt76_mcuq_id' to different
enumeration type 'enum mt76_txq_id' [-Wenum-conversion]
                txq = MT_MCUQ_WA;
                    ~ ^~~~~~~~~~
drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:282:9: warning: implicit
conversion from enumeration type 'enum mt76_mcuq_id' to different
enumeration type 'enum mt76_txq_id' [-Wenum-conversion]
                txq = MT_MCUQ_WM;
                    ~ ^~~~~~~~~~
3 warnings generated.

drivers/net/wireless/mediatek/mt76/mt7615/mcu.c:238:9: warning: implicit
conversion from enumeration type 'enum mt76_mcuq_id' to different
enumeration type 'enum mt76_txq_id' [-Wenum-conversion]
                qid = MT_MCUQ_WM;
                    ~ ^~~~~~~~~~
drivers/net/wireless/mediatek/mt76/mt7615/mcu.c:240:9: warning: implicit
conversion from enumeration type 'enum mt76_mcuq_id' to different
enumeration type 'enum mt76_txq_id' [-Wenum-conversion]
                qid = MT_MCUQ_FWDL;
                    ~ ^~~~~~~~~~~~
2 warnings generated.

Use the proper type for the queue ID variables to fix these warnings.
Additionally, rename the txq variable in mt7915_mcu_send_message to be
more neutral like mt7615_mcu_send_message.

Fixes: e637763b606b ("mt76: move mcu queues to mt76_dev q_mcu array")
Link: https://github.com/ClangBuiltLinux/linux/issues/1229
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---
 drivers/net/wireless/mediatek/mt76/mt7615/mcu.c |  2 +-
 drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
index a44b7766dec6..c13547841a4e 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
@@ -231,7 +231,7 @@ mt7615_mcu_send_message(struct mt76_dev *mdev, struct sk_buff *skb,
 			int cmd, int *seq)
 {
 	struct mt7615_dev *dev = container_of(mdev, struct mt7615_dev, mt76);
-	enum mt76_txq_id qid;
+	enum mt76_mcuq_id qid;
 
 	mt7615_mcu_fill_msg(dev, skb, cmd, seq);
 	if (test_bit(MT76_STATE_MCU_RUNNING, &dev->mphy.state))
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
index 5fdd1a6d32ee..e211a2bd4d3c 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
@@ -256,7 +256,7 @@ mt7915_mcu_send_message(struct mt76_dev *mdev, struct sk_buff *skb,
 	struct mt7915_dev *dev = container_of(mdev, struct mt7915_dev, mt76);
 	struct mt7915_mcu_txd *mcu_txd;
 	u8 seq, pkt_fmt, qidx;
-	enum mt76_txq_id txq;
+	enum mt76_mcuq_id qid;
 	__le32 *txd;
 	u32 val;
 
@@ -268,18 +268,18 @@ mt7915_mcu_send_message(struct mt76_dev *mdev, struct sk_buff *skb,
 		seq = ++dev->mt76.mcu.msg_seq & 0xf;
 
 	if (cmd == -MCU_CMD_FW_SCATTER) {
-		txq = MT_MCUQ_FWDL;
+		qid = MT_MCUQ_FWDL;
 		goto exit;
 	}
 
 	mcu_txd = (struct mt7915_mcu_txd *)skb_push(skb, sizeof(*mcu_txd));
 
 	if (test_bit(MT76_STATE_MCU_RUNNING, &dev->mphy.state)) {
-		txq = MT_MCUQ_WA;
+		qid = MT_MCUQ_WA;
 		qidx = MT_TX_MCU_PORT_RX_Q0;
 		pkt_fmt = MT_TX_TYPE_CMD;
 	} else {
-		txq = MT_MCUQ_WM;
+		qid = MT_MCUQ_WM;
 		qidx = MT_TX_MCU_PORT_RX_Q0;
 		pkt_fmt = MT_TX_TYPE_CMD;
 	}
@@ -326,7 +326,7 @@ mt7915_mcu_send_message(struct mt76_dev *mdev, struct sk_buff *skb,
 	if (wait_seq)
 		*wait_seq = seq;
 
-	return mt76_tx_queue_skb_raw(dev, mdev->q_mcu[txq], skb, 0);
+	return mt76_tx_queue_skb_raw(dev, mdev->q_mcu[qid], skb, 0);
 }
 
 static void

base-commit: 5c8fe583cce542aa0b84adc939ce85293de36e5e
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] mt76: Fix queue ID variable types after mcu queue split
  2020-12-29 21:15 [PATCH] mt76: Fix queue ID variable types after mcu queue split Nathan Chancellor
@ 2020-12-31 10:09 ` Lorenzo Bianconi
  2021-01-11  8:06   ` Kalle Valo
  2021-01-14 16:48 ` Kalle Valo
  1 sibling, 1 reply; 6+ messages in thread
From: Lorenzo Bianconi @ 2020-12-31 10:09 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Felix Fietkau, Lorenzo Bianconi, Ryder Lee, Kalle Valo,
	linux-wireless, netdev, linux-mediatek, linux-kernel,
	clang-built-linux

[-- Attachment #1: Type: text/plain, Size: 4399 bytes --]

> Clang warns in both mt7615 and mt7915:
> 
> drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:271:9: warning: implicit
> conversion from enumeration type 'enum mt76_mcuq_id' to different
> enumeration type 'enum mt76_txq_id' [-Wenum-conversion]
>                 txq = MT_MCUQ_FWDL;
>                     ~ ^~~~~~~~~~~~
> drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:278:9: warning: implicit
> conversion from enumeration type 'enum mt76_mcuq_id' to different
> enumeration type 'enum mt76_txq_id' [-Wenum-conversion]
>                 txq = MT_MCUQ_WA;
>                     ~ ^~~~~~~~~~
> drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:282:9: warning: implicit
> conversion from enumeration type 'enum mt76_mcuq_id' to different
> enumeration type 'enum mt76_txq_id' [-Wenum-conversion]
>                 txq = MT_MCUQ_WM;
>                     ~ ^~~~~~~~~~
> 3 warnings generated.
> 
> drivers/net/wireless/mediatek/mt76/mt7615/mcu.c:238:9: warning: implicit
> conversion from enumeration type 'enum mt76_mcuq_id' to different
> enumeration type 'enum mt76_txq_id' [-Wenum-conversion]
>                 qid = MT_MCUQ_WM;
>                     ~ ^~~~~~~~~~
> drivers/net/wireless/mediatek/mt76/mt7615/mcu.c:240:9: warning: implicit
> conversion from enumeration type 'enum mt76_mcuq_id' to different
> enumeration type 'enum mt76_txq_id' [-Wenum-conversion]
>                 qid = MT_MCUQ_FWDL;
>                     ~ ^~~~~~~~~~~~
> 2 warnings generated.
> 
> Use the proper type for the queue ID variables to fix these warnings.
> Additionally, rename the txq variable in mt7915_mcu_send_message to be
> more neutral like mt7615_mcu_send_message.
> 
> Fixes: e637763b606b ("mt76: move mcu queues to mt76_dev q_mcu array")
> Link: https://github.com/ClangBuiltLinux/linux/issues/1229
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>

Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>

> ---
>  drivers/net/wireless/mediatek/mt76/mt7615/mcu.c |  2 +-
>  drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 10 +++++-----
>  2 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
> index a44b7766dec6..c13547841a4e 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
> @@ -231,7 +231,7 @@ mt7615_mcu_send_message(struct mt76_dev *mdev, struct sk_buff *skb,
>  			int cmd, int *seq)
>  {
>  	struct mt7615_dev *dev = container_of(mdev, struct mt7615_dev, mt76);
> -	enum mt76_txq_id qid;
> +	enum mt76_mcuq_id qid;
>  
>  	mt7615_mcu_fill_msg(dev, skb, cmd, seq);
>  	if (test_bit(MT76_STATE_MCU_RUNNING, &dev->mphy.state))
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
> index 5fdd1a6d32ee..e211a2bd4d3c 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
> @@ -256,7 +256,7 @@ mt7915_mcu_send_message(struct mt76_dev *mdev, struct sk_buff *skb,
>  	struct mt7915_dev *dev = container_of(mdev, struct mt7915_dev, mt76);
>  	struct mt7915_mcu_txd *mcu_txd;
>  	u8 seq, pkt_fmt, qidx;
> -	enum mt76_txq_id txq;
> +	enum mt76_mcuq_id qid;
>  	__le32 *txd;
>  	u32 val;
>  
> @@ -268,18 +268,18 @@ mt7915_mcu_send_message(struct mt76_dev *mdev, struct sk_buff *skb,
>  		seq = ++dev->mt76.mcu.msg_seq & 0xf;
>  
>  	if (cmd == -MCU_CMD_FW_SCATTER) {
> -		txq = MT_MCUQ_FWDL;
> +		qid = MT_MCUQ_FWDL;
>  		goto exit;
>  	}
>  
>  	mcu_txd = (struct mt7915_mcu_txd *)skb_push(skb, sizeof(*mcu_txd));
>  
>  	if (test_bit(MT76_STATE_MCU_RUNNING, &dev->mphy.state)) {
> -		txq = MT_MCUQ_WA;
> +		qid = MT_MCUQ_WA;
>  		qidx = MT_TX_MCU_PORT_RX_Q0;
>  		pkt_fmt = MT_TX_TYPE_CMD;
>  	} else {
> -		txq = MT_MCUQ_WM;
> +		qid = MT_MCUQ_WM;
>  		qidx = MT_TX_MCU_PORT_RX_Q0;
>  		pkt_fmt = MT_TX_TYPE_CMD;
>  	}
> @@ -326,7 +326,7 @@ mt7915_mcu_send_message(struct mt76_dev *mdev, struct sk_buff *skb,
>  	if (wait_seq)
>  		*wait_seq = seq;
>  
> -	return mt76_tx_queue_skb_raw(dev, mdev->q_mcu[txq], skb, 0);
> +	return mt76_tx_queue_skb_raw(dev, mdev->q_mcu[qid], skb, 0);
>  }
>  
>  static void
> 
> base-commit: 5c8fe583cce542aa0b84adc939ce85293de36e5e
> -- 
> 2.30.0
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mt76: Fix queue ID variable types after mcu queue split
  2020-12-31 10:09 ` Lorenzo Bianconi
@ 2021-01-11  8:06   ` Kalle Valo
  2021-01-14  9:24     ` Felix Fietkau
  0 siblings, 1 reply; 6+ messages in thread
From: Kalle Valo @ 2021-01-11  8:06 UTC (permalink / raw)
  To: Lorenzo Bianconi
  Cc: Nathan Chancellor, Felix Fietkau, Lorenzo Bianconi, Ryder Lee,
	linux-wireless, netdev, linux-mediatek, linux-kernel,
	clang-built-linux

Lorenzo Bianconi <lorenzo@kernel.org> writes:

>> Clang warns in both mt7615 and mt7915:
>> 
>> drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:271:9: warning: implicit
>> conversion from enumeration type 'enum mt76_mcuq_id' to different
>> enumeration type 'enum mt76_txq_id' [-Wenum-conversion]
>>                 txq = MT_MCUQ_FWDL;
>>                     ~ ^~~~~~~~~~~~
>> drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:278:9: warning: implicit
>> conversion from enumeration type 'enum mt76_mcuq_id' to different
>> enumeration type 'enum mt76_txq_id' [-Wenum-conversion]
>>                 txq = MT_MCUQ_WA;
>>                     ~ ^~~~~~~~~~
>> drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:282:9: warning: implicit
>> conversion from enumeration type 'enum mt76_mcuq_id' to different
>> enumeration type 'enum mt76_txq_id' [-Wenum-conversion]
>>                 txq = MT_MCUQ_WM;
>>                     ~ ^~~~~~~~~~
>> 3 warnings generated.
>> 
>> drivers/net/wireless/mediatek/mt76/mt7615/mcu.c:238:9: warning: implicit
>> conversion from enumeration type 'enum mt76_mcuq_id' to different
>> enumeration type 'enum mt76_txq_id' [-Wenum-conversion]
>>                 qid = MT_MCUQ_WM;
>>                     ~ ^~~~~~~~~~
>> drivers/net/wireless/mediatek/mt76/mt7615/mcu.c:240:9: warning: implicit
>> conversion from enumeration type 'enum mt76_mcuq_id' to different
>> enumeration type 'enum mt76_txq_id' [-Wenum-conversion]
>>                 qid = MT_MCUQ_FWDL;
>>                     ~ ^~~~~~~~~~~~
>> 2 warnings generated.
>> 
>> Use the proper type for the queue ID variables to fix these warnings.
>> Additionally, rename the txq variable in mt7915_mcu_send_message to be
>> more neutral like mt7615_mcu_send_message.
>> 
>> Fixes: e637763b606b ("mt76: move mcu queues to mt76_dev q_mcu array")
>> Link: https://github.com/ClangBuiltLinux/linux/issues/1229
>> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
>
> Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>

I see that Felix already applied this, but as this is a regression
starting from v5.11-rc1 I think it should be applied to
wireless-drivers. Felix, can you drop this from your tree so that I
could apply it to wireless-drivers?

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mt76: Fix queue ID variable types after mcu queue split
  2021-01-11  8:06   ` Kalle Valo
@ 2021-01-14  9:24     ` Felix Fietkau
  2021-01-14 10:41       ` Kalle Valo
  0 siblings, 1 reply; 6+ messages in thread
From: Felix Fietkau @ 2021-01-14  9:24 UTC (permalink / raw)
  To: Kalle Valo, Lorenzo Bianconi
  Cc: Nathan Chancellor, Lorenzo Bianconi, Ryder Lee, linux-wireless,
	netdev, linux-mediatek, linux-kernel, clang-built-linux

On 2021-01-11 09:06, Kalle Valo wrote:
> Lorenzo Bianconi <lorenzo@kernel.org> writes:
> 
>>> Clang warns in both mt7615 and mt7915:
>>> 
>>> drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:271:9: warning: implicit
>>> conversion from enumeration type 'enum mt76_mcuq_id' to different
>>> enumeration type 'enum mt76_txq_id' [-Wenum-conversion]
>>>                 txq = MT_MCUQ_FWDL;
>>>                     ~ ^~~~~~~~~~~~
>>> drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:278:9: warning: implicit
>>> conversion from enumeration type 'enum mt76_mcuq_id' to different
>>> enumeration type 'enum mt76_txq_id' [-Wenum-conversion]
>>>                 txq = MT_MCUQ_WA;
>>>                     ~ ^~~~~~~~~~
>>> drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:282:9: warning: implicit
>>> conversion from enumeration type 'enum mt76_mcuq_id' to different
>>> enumeration type 'enum mt76_txq_id' [-Wenum-conversion]
>>>                 txq = MT_MCUQ_WM;
>>>                     ~ ^~~~~~~~~~
>>> 3 warnings generated.
>>> 
>>> drivers/net/wireless/mediatek/mt76/mt7615/mcu.c:238:9: warning: implicit
>>> conversion from enumeration type 'enum mt76_mcuq_id' to different
>>> enumeration type 'enum mt76_txq_id' [-Wenum-conversion]
>>>                 qid = MT_MCUQ_WM;
>>>                     ~ ^~~~~~~~~~
>>> drivers/net/wireless/mediatek/mt76/mt7615/mcu.c:240:9: warning: implicit
>>> conversion from enumeration type 'enum mt76_mcuq_id' to different
>>> enumeration type 'enum mt76_txq_id' [-Wenum-conversion]
>>>                 qid = MT_MCUQ_FWDL;
>>>                     ~ ^~~~~~~~~~~~
>>> 2 warnings generated.
>>> 
>>> Use the proper type for the queue ID variables to fix these warnings.
>>> Additionally, rename the txq variable in mt7915_mcu_send_message to be
>>> more neutral like mt7615_mcu_send_message.
>>> 
>>> Fixes: e637763b606b ("mt76: move mcu queues to mt76_dev q_mcu array")
>>> Link: https://github.com/ClangBuiltLinux/linux/issues/1229
>>> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
>>
>> Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
> 
> I see that Felix already applied this, but as this is a regression
> starting from v5.11-rc1 I think it should be applied to
> wireless-drivers. Felix, can you drop this from your tree so that I
> could apply it to wireless-drivers?
Sure, will do.

- Felix


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mt76: Fix queue ID variable types after mcu queue split
  2021-01-14  9:24     ` Felix Fietkau
@ 2021-01-14 10:41       ` Kalle Valo
  0 siblings, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2021-01-14 10:41 UTC (permalink / raw)
  To: Felix Fietkau
  Cc: Lorenzo Bianconi, Nathan Chancellor, Lorenzo Bianconi, Ryder Lee,
	linux-wireless, netdev, linux-mediatek, linux-kernel,
	clang-built-linux

Felix Fietkau <nbd@nbd.name> writes:

> On 2021-01-11 09:06, Kalle Valo wrote:
>> Lorenzo Bianconi <lorenzo@kernel.org> writes:
>> 
>>>> Clang warns in both mt7615 and mt7915:
>>>> 
>>>> drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:271:9: warning: implicit
>>>> conversion from enumeration type 'enum mt76_mcuq_id' to different
>>>> enumeration type 'enum mt76_txq_id' [-Wenum-conversion]
>>>>                 txq = MT_MCUQ_FWDL;
>>>>                     ~ ^~~~~~~~~~~~
>>>> drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:278:9: warning: implicit
>>>> conversion from enumeration type 'enum mt76_mcuq_id' to different
>>>> enumeration type 'enum mt76_txq_id' [-Wenum-conversion]
>>>>                 txq = MT_MCUQ_WA;
>>>>                     ~ ^~~~~~~~~~
>>>> drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:282:9: warning: implicit
>>>> conversion from enumeration type 'enum mt76_mcuq_id' to different
>>>> enumeration type 'enum mt76_txq_id' [-Wenum-conversion]
>>>>                 txq = MT_MCUQ_WM;
>>>>                     ~ ^~~~~~~~~~
>>>> 3 warnings generated.
>>>> 
>>>> drivers/net/wireless/mediatek/mt76/mt7615/mcu.c:238:9: warning: implicit
>>>> conversion from enumeration type 'enum mt76_mcuq_id' to different
>>>> enumeration type 'enum mt76_txq_id' [-Wenum-conversion]
>>>>                 qid = MT_MCUQ_WM;
>>>>                     ~ ^~~~~~~~~~
>>>> drivers/net/wireless/mediatek/mt76/mt7615/mcu.c:240:9: warning: implicit
>>>> conversion from enumeration type 'enum mt76_mcuq_id' to different
>>>> enumeration type 'enum mt76_txq_id' [-Wenum-conversion]
>>>>                 qid = MT_MCUQ_FWDL;
>>>>                     ~ ^~~~~~~~~~~~
>>>> 2 warnings generated.
>>>> 
>>>> Use the proper type for the queue ID variables to fix these warnings.
>>>> Additionally, rename the txq variable in mt7915_mcu_send_message to be
>>>> more neutral like mt7615_mcu_send_message.
>>>> 
>>>> Fixes: e637763b606b ("mt76: move mcu queues to mt76_dev q_mcu array")
>>>> Link: https://github.com/ClangBuiltLinux/linux/issues/1229
>>>> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
>>>
>>> Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
>> 
>> I see that Felix already applied this, but as this is a regression
>> starting from v5.11-rc1 I think it should be applied to
>> wireless-drivers. Felix, can you drop this from your tree so that I
>> could apply it to wireless-drivers?
>
> Sure, will do.

Thanks. I now assigned to me in patchwork and will apply to
wireless-drivers soon.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mt76: Fix queue ID variable types after mcu queue split
  2020-12-29 21:15 [PATCH] mt76: Fix queue ID variable types after mcu queue split Nathan Chancellor
  2020-12-31 10:09 ` Lorenzo Bianconi
@ 2021-01-14 16:48 ` Kalle Valo
  1 sibling, 0 replies; 6+ messages in thread
From: Kalle Valo @ 2021-01-14 16:48 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Felix Fietkau, Lorenzo Bianconi, Ryder Lee, linux-wireless,
	netdev, linux-mediatek, linux-kernel, clang-built-linux,
	Nathan Chancellor

Nathan Chancellor <natechancellor@gmail.com> wrote:

> Clang warns in both mt7615 and mt7915:
> 
> drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:271:9: warning: implicit
> conversion from enumeration type 'enum mt76_mcuq_id' to different
> enumeration type 'enum mt76_txq_id' [-Wenum-conversion]
>                 txq = MT_MCUQ_FWDL;
>                     ~ ^~~~~~~~~~~~
> drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:278:9: warning: implicit
> conversion from enumeration type 'enum mt76_mcuq_id' to different
> enumeration type 'enum mt76_txq_id' [-Wenum-conversion]
>                 txq = MT_MCUQ_WA;
>                     ~ ^~~~~~~~~~
> drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:282:9: warning: implicit
> conversion from enumeration type 'enum mt76_mcuq_id' to different
> enumeration type 'enum mt76_txq_id' [-Wenum-conversion]
>                 txq = MT_MCUQ_WM;
>                     ~ ^~~~~~~~~~
> 3 warnings generated.
> 
> drivers/net/wireless/mediatek/mt76/mt7615/mcu.c:238:9: warning: implicit
> conversion from enumeration type 'enum mt76_mcuq_id' to different
> enumeration type 'enum mt76_txq_id' [-Wenum-conversion]
>                 qid = MT_MCUQ_WM;
>                     ~ ^~~~~~~~~~
> drivers/net/wireless/mediatek/mt76/mt7615/mcu.c:240:9: warning: implicit
> conversion from enumeration type 'enum mt76_mcuq_id' to different
> enumeration type 'enum mt76_txq_id' [-Wenum-conversion]
>                 qid = MT_MCUQ_FWDL;
>                     ~ ^~~~~~~~~~~~
> 2 warnings generated.
> 
> Use the proper type for the queue ID variables to fix these warnings.
> Additionally, rename the txq variable in mt7915_mcu_send_message to be
> more neutral like mt7615_mcu_send_message.
> 
> Fixes: e637763b606b ("mt76: move mcu queues to mt76_dev q_mcu array")
> Link: https://github.com/ClangBuiltLinux/linux/issues/1229
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>

Patch applied to wireless-drivers.git, thanks.

b7c568752ef3 mt76: Fix queue ID variable types after mcu queue split

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/20201229211548.1348077-1-natechancellor@gmail.com/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-01-14 16:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-29 21:15 [PATCH] mt76: Fix queue ID variable types after mcu queue split Nathan Chancellor
2020-12-31 10:09 ` Lorenzo Bianconi
2021-01-11  8:06   ` Kalle Valo
2021-01-14  9:24     ` Felix Fietkau
2021-01-14 10:41       ` Kalle Valo
2021-01-14 16:48 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).