[PATCH next 09/11] tree-wide: minmax: Replace all the uses of max() for array sizes with max_const()

David Sterba dsterba at suse.cz
Mon Jan 29 07:54:12 UTC 2024


On Sun, Jan 28, 2024 at 07:34:23PM +0000, David Laight wrote:
> These are the only uses of max() that require a constant value
> from constant parameters.
> There don't seem to be any similar uses of min().
> 
> Replacing the max() by max_const() lets min()/max() be simplified
> speeding up compilation.
> 
> max_const() will convert enums to int (or unsigned int) so that the
> casts added by max_t() are no longer needed.
> 
> Signed-off-by: David Laight <david.laight at aculab.com>
> ---

For

>  fs/btrfs/tree-checker.c                        | 2 +-

Acked-by: David Sterba <dsterba at suse.com>


More information about the dri-devel mailing list