Hi, On 8/3/23 11:17, Hans de Goede wrote: > Hi, > > On 8/2/23 21:37, Andy Shevchenko wrote: <snip> >>> + width = min_t(unsigned int, ALIGN(format->format.width, 2), >>> + OV2680_NATIVE_WIDTH); >>> + height = min_t(unsigned int, ALIGN(format->format.height, 2), >>> + OV2680_NATIVE_HEIGHT); >> >> Wondering if you can switch these to use min() (with a strict type checking). >> It might require adding U/UL to the respective constants. > > > I'll try to switch to regular min() use here for v5. Ok, so I tried and failed. format->format.height is an __u32 and even if I add a 'u' suffix to OV2680_NATIVE_WIDTH regular min() does not like it: drivers/media/i2c/ov2680.c: In function ‘ov2680_calc_mode’: ./include/linux/minmax.h:20:35: warning: comparison of distinct pointer types lacks a cast 20 | (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1))) | ^~ Regards, Hans