Re: [PATCH v3 06/11] wimax/i2400m: remove unlikely() from WARN*() condition

From: Denis Efremov
Date: Sat Aug 31 2019 - 11:59:57 EST




On 31.08.2019 14:25, Markus Elfring wrote:
>> ÂÂÂÂÂÂÂÂ pad_buf = i2400m_tx_fifo_push(i2400m, padding, 0, 0);
>> -ÂÂÂÂÂÂÂ if (unlikely(WARN_ON(pad_buf == NULL
>> -ÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂÂ || pad_buf == TAIL_FULL))) {
>> +ÂÂÂÂÂÂÂ if (WARN_ON(pad_buf == NULL || pad_buf == TAIL_FULL)) {
>
> How do you think about to use the following code variant?
>
> +ÂÂÂÂÂÂÂ if (WARN_ON(!pad_buf || pad_buf == TAIL_FULL)) {
>

Well, I thought about it, because coccinelle warns about style here.
But this condition looks more symmetric with direct comparison.
I've decided that it will be better to save the original style.

Thanks,
Denis