Skip to contentSkip to conversation

staging: media/atomisp: use max() impl

PATCH New Karthik Alapati 1 participant 1 message Jun 22, 2022

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: media/atomisp: use max() impl

fix a coccinelle warning by replacing opencoded max() implementation with max()

WARNING opportunity for max()

---
 drivers/staging/media/atomisp/pci/runtime/frame/src/frame.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/staging/media/atomisp/pci/runtime/frame/src/frame.c +1 -4
index a3aae638b0bf..0fa91628a463 100644
@@ -460,10 +460,7 @@ void ia_css_frame_info_set_width(struct ia_css_frame_info *info,
 		IA_CSS_LEAVE_PRIVATE("");
 		return;
 	}
-	if (min_padded_width > width)
-		align = min_padded_width;
-	else
-		align = width;
+	align = max(min_padded_width, width);
 
 	info->res.width = width;
 	/* frames with a U and V plane of 8 bits per pixel need to have
Signature · 1 line
2.36.1