Linux-Wireless Archive on lore.kernel.org
 help / color / Atom feed
From: Ryder Lee <ryder.lee@mediatek.com>
To: Nathan Chancellor <natechancellor@gmail.com>
Cc: Felix Fietkau <nbd@nbd.name>,
	Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>,
	<linux-wireless@vger.kernel.org>, <netdev@vger.kernel.org>,
	<linux-mediatek@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>,
	<clang-built-linux@googlegroups.com>
Subject: Re: [PATCH] mt76: mt7915: Use proper enum type in __mt7915_mcu_msg_send
Date: Sat, 23 May 2020 15:46:19 +0800
Message-ID: <1590219979.19657.2.camel@mtkswgap22> (raw)
In-Reply-To: <20200523041923.3332257-1-natechancellor@gmail.com>

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.

      reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-23  4:19 Nathan Chancellor
2020-05-23  7:46 ` Ryder Lee [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1590219979.19657.2.camel@mtkswgap22 \
    --to=ryder.lee@mediatek.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo.bianconi83@gmail.com \
    --cc=natechancellor@gmail.com \
    --cc=nbd@nbd.name \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-Wireless Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-wireless/0 linux-wireless/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-wireless linux-wireless/ https://lore.kernel.org/linux-wireless \
		linux-wireless@vger.kernel.org
	public-inbox-index linux-wireless

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-wireless


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git