Re: [PATCH v4 04/25] dmaengine: sdxi: Prepare function and sanitize MMIO state

From: Lynch, Nathan

Date: Tue Nov 17 2026 - 17:01:59 EST


On 11/12/2026 3:26 PM, Frank Li wrote:
> On Tue, Nov 03, 2026 at 08:49:45PM -0600, Nathan Lynch via B4 Relay wrote:
>> +static int sdxi_dev_stop(struct sdxi_dev *sdxi)
>> +{
>> + unsigned long stepped_from = 0;
>> + enum sdxi_fn_gsv gsv;
>> +
>> + /*
>> + * Each step must reach a state we have not already stepped from.
>> + * The table admits no cycles, so revisiting one means the device
>> + * is not behaving as specified.
>> + */
>> + for (gsv = sdxi_dev_gsv(sdxi); gsv != SDXI_GSV_STOP; ) {
>> + const struct gsv_stop_step *step;
>> + enum sdxi_fn_gsv from = gsv;
>> +
>> + if ((size_t)gsv >= ARRAY_SIZE(gsv_stop_steps))
>> + break;
>> + if (stepped_from & BIT(gsv))
>> + break;
>> + stepped_from |= BIT(gsv);
>
> BIT_ULL()?

stepped_from is unsigned long, so I don't think so?

include/vdso/bits.h:

#define BIT(nr) (UL(1) << (nr))
#define BIT_ULL(nr) (ULL(1) << (nr))