From: Qasim Ijaz Date: Tue, 25 Feb 2025 12:59:37 +0000 (+0000) Subject: media: vgxy61: Replace nested min() with single min3() X-Git-Tag: v6.15-rc1~174^2~67 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab936836ec09fa23954e8e5785d71a41e5ee8bcb;p=thirdparty%2Fkernel%2Flinux.git media: vgxy61: Replace nested min() with single min3() Use min3() macro instead of nesting min() to simplify the return statement. Signed-off-by: Qasim Ijaz Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil --- diff --git a/drivers/media/i2c/vgxy61.c b/drivers/media/i2c/vgxy61.c index d77468c8587bc..5b0479f3a3c05 100644 --- a/drivers/media/i2c/vgxy61.c +++ b/drivers/media/i2c/vgxy61.c @@ -892,8 +892,8 @@ static u32 vgxy61_get_expo_long_max(struct vgxy61_dev *sensor, third_rot_max_expo = (sensor->frame_length / 71) * short_expo_ratio; /* Take the minimum from all rules */ - return min(min(first_rot_max_expo, second_rot_max_expo), - third_rot_max_expo); + return min3(first_rot_max_expo, second_rot_max_expo, + third_rot_max_expo); } static int vgxy61_update_exposure(struct vgxy61_dev *sensor, u16 new_expo_long,