OSDN Git Service

media: ipu3-cio2: Remove explicit type from frame size checks
authorSakari Ailus <sakari.ailus@linux.intel.com>
Mon, 12 Oct 2020 09:34:30 +0000 (11:34 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 16 Nov 2020 09:31:14 +0000 (10:31 +0100)
Now that the values are unsigned, we can remove the explicit cast to u32.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/pci/intel/ipu3/ipu3-cio2.c

index 87d040e..e42177f 100644 (file)
@@ -1282,9 +1282,8 @@ static int cio2_subdev_set_fmt(struct v4l2_subdev *sd,
                }
        }
 
-       fmt->format.width = min_t(u32, fmt->format.width, CIO2_IMAGE_MAX_WIDTH);
-       fmt->format.height = min_t(u32, fmt->format.height,
-                                  CIO2_IMAGE_MAX_LENGTH);
+       fmt->format.width = min(fmt->format.width, CIO2_IMAGE_MAX_WIDTH);
+       fmt->format.height = min(fmt->format.height, CIO2_IMAGE_MAX_LENGTH);
        fmt->format.field = V4L2_FIELD_NONE;
 
        mutex_lock(&q->subdev_lock);