Search Linux Wireless

Re: [PATCH] wifi: iwlwifi: cfg: Limit cb_size to valid range

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

 



On Fri, 2025-05-23 at 14:04 +0800, Pei Xiao wrote:
> 
>  
> -	WARN_ON(RX_QUEUE_CB_SIZE(iwl_trans_get_num_rbds(trans)) > 12);
> +	cb_size = RX_QUEUE_CB_SIZE(iwl_trans_get_num_rbds(trans));
> +	if (unlikely(cb_size > 12)) {
> +		WARN_ON(1);
> 

What's wrong with "if (WARN_ON(...))"?!?

Not that I think it even really needs to be there but I guess working
around a compiler warning could be worth it.

johannes





[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