• Philipp Zabel's avatar
    [media] tvp5150: Fix type mismatch warning in clamp macro · 785a3de1
    Philipp Zabel authored
    This patch fixes the following warning:
    
    drivers/media/i2c/tvp5150.c: In function '__tvp5150_try_crop':
    include/linux/kernel.h:762:17: warning: comparison of distinct pointer types lacks a cast [enabled by default]
      (void) (&__val == &__min);  \
                     ^
    drivers/media/i2c/tvp5150.c:886:16: note: in expansion of macro 'clamp'
      rect->width = clamp(rect->width,
                    ^
    include/linux/kernel.h:763:17: warning: comparison of distinct pointer types lacks a cast [enabled by default]
      (void) (&__val == &__max);  \
                     ^
    drivers/media/i2c/tvp5150.c:886:16: note: in expansion of macro 'clamp'
      rect->width = clamp(rect->width,
                    ^
    include/linux/kernel.h:762:17: warning: comparison of distinct pointer types lacks a cast [enabled by default]
      (void) (&__val == &__min);  \
                     ^
    drivers/media/i2c/tvp5150.c:904:17: note: in expansion of macro 'clamp'
      rect->height = clamp(rect->height,
                     ^
    include/linux/kernel.h:763:17: warning: comparison of distinct pointer types lacks a cast [enabled by default]
      (void) (&__val == &__max);  \
                     ^
    drivers/media/i2c/tvp5150.c:904:17: note: in expansion of macro 'clamp'
      rect->height = clamp(rect->height,
                     ^
    Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
    Acked-by: default avatarLad, Prabhakar <prabhakar.csengg@gmail.com>
    Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
    Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
    785a3de1
tvp5150.c 32.3 KB