Re: [PATCH] wifi: rsi: Fix types to appease CFI

Stefan Hansson <[email protected]> Sun, 2 Aug 2026 20:44:06 +0200
Newsgroups org.kernel.vger.phone-devel,org.kernel.vger.linux-kernel,org.kernel.vger.linux-wireless
Message-ID <[email protected]>
Hi Jeff,

On 02/08/2026 16:30, Jeff Johnson wrote:
> 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 <[email protected]>
> 
> 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 <[email protected]>' != 'Signed-off-by: Stefan
> Hansson <[email protected]>'

I was struggling to get b4 send to work with the mail service we use for 
our postmarketOS email addresses but I have set up b4 relay now, so the 
v2 should not have this issue. Hope switching around the sender in a new 
revision is okay.

> 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;

Regards,
Stefan Hansson