Re: [PATCH] wifi: iwlwifi: pcie: ensure RX_QUEUE_CB_SIZE fits bitfield for gcc-8|9

From: Arnd Bergmann
Date: Thu Jun 12 2025 - 15:49:39 EST


On Thu, Jun 12, 2025, at 21:33, Anders Roxell wrote:
> On 2025-06-12 17:21, Johannes Berg wrote:
>
> Would it help if I indent like this?
>
> + /* This should just be u32_encode_bits() but gcc-8 and gcc-9 fail to build */
> + control_flags |= FIELD_PREP(IWL_CTXT_INFO_RB_CB_SIZE,
> + RX_QUEUE_CB_SIZE(iwl_trans_get_num_rbds(trans)) &
> + FIELD_MAX(IWL_CTXT_INFO_RB_CB_SIZE));
> control_flags |= u32_encode_bits(rb_size, IWL_CTXT_INFO_RB_SIZE);

I still find it odd to mix FIELD_PREP() and u32_encode_bits() here,
as they do the same thing.

Arnd