Re: [PATCH v3] firmware/sysfb: Fix VESA format selection
From: Pierre Asselin
Date: Thu Apr 20 2023 - 12:05:36 EST
I went back to nested max3() after all as Thomas asked. My first cut
had casts in the innermost max3() and the code looked truly awful. I
decided that two casts are tolerable. I added a comment to explain
the casts.
Against clamp_t(u8,lfb_depth,1,32): the clamp_t() macro does no
typechecking; might as well just cast lfb_depth to u8, but that assumes
the value would fit (positively crazy if it doesn't, but still.)
Instead, I widen the other two args of the outer max3().
--PA