Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 785a3de1 authored by Philipp Zabel's avatar Philipp Zabel Committed by Mauro Carvalho Chehab
Browse files

[media] tvp5150: Fix type mismatch warning in clamp macro



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>
parent 73a8ca48
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -16,9 +16,9 @@


#include "tvp5150_reg.h"
#include "tvp5150_reg.h"


#define TVP5150_H_MAX		720
#define TVP5150_H_MAX		720U
#define TVP5150_V_MAX_525_60	480
#define TVP5150_V_MAX_525_60	480U
#define TVP5150_V_MAX_OTHERS	576
#define TVP5150_V_MAX_OTHERS	576U
#define TVP5150_MAX_CROP_LEFT	511
#define TVP5150_MAX_CROP_LEFT	511
#define TVP5150_MAX_CROP_TOP	127
#define TVP5150_MAX_CROP_TOP	127
#define TVP5150_CROP_SHIFT	2
#define TVP5150_CROP_SHIFT	2