On 5/27/21 3:01 AM, Bart Van Assche wrote: > Modern compilers complain if an out-of-range value is passed to a function > argument that has an enumeration type. Let the compiler detect out-of-range > data direction arguments instead of verifying the data_dir argument at > runtime. > > Cc: Damien Le Moal <damien.lemoal@xxxxxxx> > Cc: Christoph Hellwig <hch@xxxxxx> > Cc: Ming Lei <ming.lei@xxxxxxxxxx> > Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx> > --- > block/mq-deadline.c | 96 +++++++++++++++++++++++---------------------- > 1 file changed, 49 insertions(+), 47 deletions(-) > Reviewed-by: Hannes Reinecke <hare@xxxxxxx> Cheers, Hannes -- Dr. Hannes Reinecke Kernel Storage Architect hare@xxxxxxx +49 911 74053 688 SUSE Software Solutions Germany GmbH, 90409 Nürnberg GF: F. Imendörffer, HRB 36809 (AG Nürnberg)