On Tue, Feb 18, 2020 at 04:10:57PM -0800, Bart Van Assche wrote: > On 2/18/20 3:44 PM, Christoph Hellwig wrote: >> Use an enum to specify the various quirks instead of #defines inside >> the structure definition. > > Hi Christoph, > > Although this patch looks like a significant improvement to me: has it been > considered to change 'quirks' from an unsigned int into a bitfield with one > bit per quirk? I think that would allow to remove multiple explicit bit > manipulations from the UFS driver. And it wouldn't make it quite as obvious what are quirks. Never mind that the compiler would still do the masking and potentially affect other fields placed right next to it. Bitfields tend to be a bad idea just about everywhere.