[PATCH v3] firmware/sysfb: Fix VESA format selection
Pierre Asselin
pa at panix.com
Thu Apr 20 16:05:28 UTC 2023
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
More information about the dri-devel
mailing list