On 2021/05/28 4:38, Bart Van Assche wrote: > On 5/26/21 8:24 PM, Damien Le Moal wrote: >> On 2021/05/27 10:02, Bart Van Assche wrote: >>> +enum dd_data_dir { >>> + DD_READ = READ, >>> + DD_WRITE = WRITE, >>> +} __packed; >> >> Why the "__packed" here ? > > I agree that using __packed here does not have any advantage. I will > leave it out. > >>> + >>> +enum { DD_DIR_COUNT = 2 }; >> >> Why not a simple #define for this one ? > > I only use the C preprocessor if there is no other solution. As far as I > know there are no rules in the kernel coding style guidelines with > regard whether to use a #define or an enum to define a constant? It is fine as is. I just find it a little too verbose compared to a simple macro definition. Just a matter of taste I guess :) -- Damien Le Moal Western Digital Research