Re: [PATCH] wifi: rsi: Fix types to appease CFI
From: Jeff Johnson
Date: Sun Aug 02 2026 - 10:31:01 EST
On 8/2/2026 5:22 AM, Stefan Hansson wrote:
> Avoids errors like:
>
> CFI failure at kthread+0x124/0x1cc (target: rsi_coex_scheduler_thread+0x0/0x1b4 [redpine_91x]; expected type: 0x89fb613d)
>
> As seen in the aforementioned error this was tested using the downstream
> redpine_91x driver found in the Librem 5's downstream source tree.
> However, it appears that this driver is a modified version of the rsi
> driver found in mainline Linux and as such I decided to port the changes
> here too.
>
> Signed-off-by: Stefan Hansson <newbyte@xxxxxxxxxxxxxxxx>
Having fixed a ton of these issues in the Qualcomm Android downstream driver I
was going to give my R-B, but I ran this through my ath.git patch acceptance
process and it flagged some issues, starting with:
WARNING:FROM_SIGN_OFF_MISMATCH: From:/Signed-off-by: email address mismatch:
'From: Stefan Hansson <newbie13xd@xxxxxxxxx>' != 'Signed-off-by: Stefan
Hansson <newbyte@xxxxxxxxxxxxxxxx>'
There are also kernel-doc issues noted below
> @@ -246,12 +246,13 @@ EXPORT_SYMBOL_GPL(rsi_read_pkt);
> /**
> * rsi_tx_scheduler_thread() - This function is a kernel thread to send the
> * packets to the device.
> - * @common: Pointer to the driver private structure.
> + * @data: Pointer to the driver private structure.
> *
> * Return: None.
Return: 0
> */
> -static void rsi_tx_scheduler_thread(struct rsi_common *common)
> +static int rsi_tx_scheduler_thread(void *data)
> {
> + struct rsi_common *common = data;
> struct rsi_hw *adapter = common->priv;
> u32 timeout = EVENT_WAIT_FOREVER;
>
...
> diff --git a/drivers/net/wireless/rsi/rsi_91x_usb_ops.c b/drivers/net/wireless/rsi/rsi_91x_usb_ops.c
> index 25c2b232394a..513d2fdfb510 100644
> --- a/drivers/net/wireless/rsi/rsi_91x_usb_ops.c
> +++ b/drivers/net/wireless/rsi/rsi_91x_usb_ops.c
> @@ -25,8 +25,9 @@
above here update the documentation: s/common/data/
Warning: drivers/net/wireless/rsi/rsi_91x_usb_ops.c:28 function parameter
'data' not described in 'rsi_usb_rx_thread'
Warning: drivers/net/wireless/rsi/rsi_91x_usb_ops.c:28 Excess function
parameter 'common' description in 'rsi_usb_rx_thread'
> *
> * Return: None.
Return: 0
> */
> -void rsi_usb_rx_thread(struct rsi_common *common)
> +int rsi_usb_rx_thread(void *data)
> {
> + struct rsi_common *common = data;
> struct rsi_hw *adapter = common->priv;
> struct rsi_91x_usbdev *dev = adapter->rsi_dev;
> int status;