Search Linux Wireless

RE: [bug report] wifi: rtw88: usb: fix priority queue to endpoint mapping

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Sascha,

> -----Original Message-----
> From: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> Sent: Thursday, May 4, 2023 6:56 PM
> To: s.hauer@xxxxxxxxxxxxxx
> Cc: linux-wireless@xxxxxxxxxxxxxxx
> 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




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux