Re: [PATCH v4 21/32] media: ov2680: Make setting the mode algorithm based

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux