linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mt76: mt7915: Use proper enum type in __mt7915_mcu_msg_send
@ 2020-05-23  4:19 Nathan Chancellor
  2020-05-23  7:46 ` Ryder Lee
  0 siblings, 1 reply; 2+ messages in thread
From: Nathan Chancellor @ 2020-05-23  4:19 UTC (permalink / raw)
  To: Felix Fietkau, Lorenzo Bianconi
  Cc: Ryder Lee, linux-wireless, netdev, linux-mediatek, linux-kernel,
	clang-built-linux, Nathan Chancellor

Clang warns:

drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:232:9: warning: implicit
conversion from enumeration type 'enum mt76_txq_id' to different
enumeration type 'enum mt7915_txq_id' [-Wenum-conversion]
                txq = MT_TXQ_FWDL;
                    ~ ^~~~~~~~~~~
drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:239:9: warning: implicit
conversion from enumeration type 'enum mt76_txq_id' to different
enumeration type 'enum mt7915_txq_id' [-Wenum-conversion]
                txq = MT_TXQ_MCU_WA;
                    ~ ^~~~~~~~~~~~~
drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:243:9: warning: implicit
conversion from enumeration type 'enum mt76_txq_id' to different
enumeration type 'enum mt7915_txq_id' [-Wenum-conversion]
                txq = MT_TXQ_MCU;
                    ~ ^~~~~~~~~~
drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:287:36: warning:
implicit conversion from enumeration type 'enum mt7915_txq_id' to
different enumeration type 'enum mt76_txq_id' [-Wenum-conversion]
        return mt76_tx_queue_skb_raw(dev, txq, skb, 0);
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~

txq should be a "enum mt76_txq_id" as values of that type are the only
ones assigned to it and that is the type that mt76_tx_queue_skb_raw
expects.

Fixes: e57b7901469f ("mt76: add mac80211 driver for MT7915 PCIe-based chipsets")
Link: https://github.com/ClangBuiltLinux/linux/issues/1035
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---
 drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
index f00ad2b66761..916f664e964e 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
@@ -220,7 +220,7 @@ static int __mt7915_mcu_msg_send(struct mt7915_dev *dev, struct sk_buff *skb,
 {
 	struct mt7915_mcu_txd *mcu_txd;
 	u8 seq, pkt_fmt, qidx;
-	enum mt7915_txq_id txq;
+	enum mt76_txq_id txq;
 	__le32 *txd;
 	u32 val;
 

base-commit: c11d28ab4a691736e30b49813fb801847bd44e83
-- 
2.27.0.rc0


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

* Re: [PATCH] mt76: mt7915: Use proper enum type in __mt7915_mcu_msg_send
  2020-05-23  4:19 [PATCH] mt76: mt7915: Use proper enum type in __mt7915_mcu_msg_send Nathan Chancellor
@ 2020-05-23  7:46 ` Ryder Lee
  0 siblings, 0 replies; 2+ messages in thread
From: Ryder Lee @ 2020-05-23  7:46 UTC (permalink / raw)
  To: Nathan Chancellor
  Cc: Felix Fietkau, Lorenzo Bianconi, linux-wireless, netdev,
	linux-mediatek, linux-kernel, clang-built-linux

On Fri, 2020-05-22 at 21:19 -0700, Nathan Chancellor wrote:
> Clang warns:
> 
> drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:232:9: warning: implicit
> conversion from enumeration type 'enum mt76_txq_id' to different
> enumeration type 'enum mt7915_txq_id' [-Wenum-conversion]
>                 txq = MT_TXQ_FWDL;
>                     ~ ^~~~~~~~~~~
> drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:239:9: warning: implicit
> conversion from enumeration type 'enum mt76_txq_id' to different
> enumeration type 'enum mt7915_txq_id' [-Wenum-conversion]
>                 txq = MT_TXQ_MCU_WA;
>                     ~ ^~~~~~~~~~~~~
> drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:243:9: warning: implicit
> conversion from enumeration type 'enum mt76_txq_id' to different
> enumeration type 'enum mt7915_txq_id' [-Wenum-conversion]
>                 txq = MT_TXQ_MCU;
>                     ~ ^~~~~~~~~~
> drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:287:36: warning:
> implicit conversion from enumeration type 'enum mt7915_txq_id' to
> different enumeration type 'enum mt76_txq_id' [-Wenum-conversion]
>         return mt76_tx_queue_skb_raw(dev, txq, skb, 0);
>                ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
> 
> txq should be a "enum mt76_txq_id" as values of that type are the only
> ones assigned to it and that is the type that mt76_tx_queue_skb_raw
> expects.
> 
> Fixes: e57b7901469f ("mt76: add mac80211 driver for MT7915 PCIe-based chipsets")
> Link: https://github.com/ClangBuiltLinux/linux/issues/1035
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> ---
>  drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
> index f00ad2b66761..916f664e964e 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
> @@ -220,7 +220,7 @@ static int __mt7915_mcu_msg_send(struct mt7915_dev *dev, struct sk_buff *skb,
>  {
>  	struct mt7915_mcu_txd *mcu_txd;
>  	u8 seq, pkt_fmt, qidx;
> -	enum mt7915_txq_id txq;
> +	enum mt76_txq_id txq;
>  	__le32 *txd;
>  	u32 val;
>  
> 
> base-commit: c11d28ab4a691736e30b49813fb801847bd44e83

Thanks. I have posted the fix here:
https://patchwork.kernel.org/patch/11553415/
This is already in Felix's tree.

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

end of thread, other threads:[~2020-05-23  7:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-23  4:19 [PATCH] mt76: mt7915: Use proper enum type in __mt7915_mcu_msg_send Nathan Chancellor
2020-05-23  7:46 ` Ryder Lee

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).