]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: vgxy61: Replace nested min() with single min3()
authorQasim Ijaz <qasdev00@gmail.com>
Tue, 25 Feb 2025 12:59:37 +0000 (12:59 +0000)
committerHans Verkuil <hverkuil@xs4all.nl>
Tue, 4 Mar 2025 12:35:32 +0000 (13:35 +0100)
Use min3() macro instead of nesting min() to simplify the return
statement.

Signed-off-by: Qasim Ijaz <qasdev00@gmail.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
drivers/media/i2c/vgxy61.c

index d77468c8587bc440b2b7bd6ce360b112c4ae7493..5b0479f3a3c0592be430cefe5a1ab9a76812ba84 100644 (file)
@@ -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,