linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: Dan Carpenter <dan.carpenter@linaro.org>,
	"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: RE: [bug report] wifi: rtw88: usb: fix priority queue to endpoint mapping
Date: Mon, 8 May 2023 02:39:19 +0000	[thread overview]
Message-ID: <ab52f337fdf842499912458efab7704c@realtek.com> (raw)
In-Reply-To: <c3f70197-829d-48ed-ae15-66a9de80fa90@kili.mountain>

Hi Sascha,

> -----Original Message-----
> From: Dan Carpenter <dan.carpenter@linaro.org>
> Sent: Thursday, May 4, 2023 6:56 PM
> To: s.hauer@pengutronix.de
> Cc: linux-wireless@vger.kernel.org
> Subject: [bug report] wifi: rtw88: usb: fix priority queue to endpoint mapping
> 
> Hello Sascha Hauer,
> 
> The patch a6f187f92bcc: "wifi: rtw88: usb: fix priority queue to
> endpoint mapping" from Apr 17, 2023, leads to the following Smatch
> static checker warning:
> 
> drivers/net/wireless/realtek/rtw88/usb.c:219 rtw_usb_parse() warn: assigning (-22) to unsigned variable
> 'rtwusb->qsel_to_ep[8]'

[...]

>     218         rtwusb->qsel_to_ep[TX_DESC_QSEL_TID7] = dma_mapping_to_ep(rqpn->dma_map_vo);
> --> 219         rtwusb->qsel_to_ep[TX_DESC_QSEL_TID8] = -EINVAL;
> 
> Can't save negative error codes to a u8.
> 

return type of dma_mapping_to_ep() is 'int' and it also possibly returns -EINVAL, and
rtwusb->qsel_to_ep[] is used by qsel_to_ep() that also use 'int' as return type. 
Therefore, I would like to change type of qsel_to_ep[] from 'u8' to 'int'. Does it
work to you?

Ping-Ke


  reply	other threads:[~2023-05-08  2:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-04 10:56 [bug report] wifi: rtw88: usb: fix priority queue to endpoint mapping Dan Carpenter
2023-05-08  2:39 ` Ping-Ke Shih [this message]
2023-05-08  9:00   ` Ping-Ke Shih
2023-05-08  9:35   ` s.hauer
2023-05-08 14:04   ` Larry Finger

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=ab52f337fdf842499912458efab7704c@realtek.com \
    --to=pkshih@realtek.com \
    --cc=dan.carpenter@linaro.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).