* [PATCH] staging: media/atomisp: use max() impl
@ 2022-06-22 16:39 Karthik Alapati
0 siblings, 0 replies; only message in thread
From: Karthik Alapati @ 2022-06-22 16:39 UTC (permalink / raw)
To: Mauro Carvalho Chehab, Sakari Ailus, Greg Kroah-Hartman, Xu Wang
Cc: linux-media, linux-staging, linux-kernel
fix a coccinelle warning by replacing opencoded max()
implementation with max()
WARNING opportunity for max()
Signed-off-by: Karthik Alapati <mail@karthek.com>
---
drivers/staging/media/atomisp/pci/runtime/frame/src/frame.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/staging/media/atomisp/pci/runtime/frame/src/frame.c b/drivers/staging/media/atomisp/pci/runtime/frame/src/frame.c
index a3aae638b0bf..0fa91628a463 100644
--- a/drivers/staging/media/atomisp/pci/runtime/frame/src/frame.c
+++ b/drivers/staging/media/atomisp/pci/runtime/frame/src/frame.c
@@ -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
--
2.36.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-06-22 16:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-22 16:39 [PATCH] staging: media/atomisp: use max() impl Karthik Alapati
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).