[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8ce6b014-331a-4e22-be45-763f9a12fc33@xs4all.nl>
Date: Wed, 24 Apr 2024 13:03:39 +0200
From: Hans Verkuil <hverkuil@...all.nl>
To: Ricardo Ribalda <ribalda@...omium.org>,
Martin Tuma <martin.tuma@...iteqautomotive.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Hugues Fruchet <hugues.fruchet@...s.st.com>,
Alain Volmat <alain.volmat@...s.st.com>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Paul Kocialkowski <paul.kocialkowski@...tlin.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>, Chen-Yu Tsai
<wens@...e.org>, Jernej Skrabec <jernej.skrabec@...il.com>,
Samuel Holland <samuel@...lland.org>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Thierry Reding <thierry.reding@...il.com>,
Jonathan Hunter <jonathanh@...dia.com>,
Sowjanya Komatineni <skomatineni@...dia.com>,
Luca Ceresoli <luca.ceresoli@...tlin.com>,
Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
Sergey Kozlov <serjk@...up.ru>, Abylay Ospan <aospan@...up.ru>,
Ezequiel Garcia <ezequiel@...guardiasur.com.ar>,
Dmitry Osipenko <digetx@...il.com>,
Benjamin Mugnier <benjamin.mugnier@...s.st.com>,
Sylvain Petinot <sylvain.petinot@...s.st.com>,
Stanimir Varbanov <stanimir.k.varbanov@...il.com>,
Vikash Garodia <quic_vgarodia@...cinc.com>,
Bryan O'Donoghue <bryan.odonoghue@...aro.org>,
Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konrad.dybcio@...aro.org>
Cc: linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org, linux-staging@...ts.linux.dev,
linux-sunxi@...ts.linux.dev, linux-tegra@...r.kernel.org,
linux-mediatek@...ts.infradead.org, linux-arm-msm@...r.kernel.org
Subject: Re: [PATCH v2 16/26] media: au0828: Use min macro
nitpick: subject should say "Use umin macro".
Hans
On 19/04/2024 11:48, Ricardo Ribalda wrote:
> Simplifies the code.
>
> Found by cocci:
> drivers/media/usb/au0828/au0828-video.c:605:11-12: WARNING opportunity for min()
>
> Signed-off-by: Ricardo Ribalda <ribalda@...omium.org>
> ---
> drivers/media/usb/au0828/au0828-video.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/media/usb/au0828/au0828-video.c b/drivers/media/usb/au0828/au0828-video.c
> index fd9fc43d47e0..2ec49ea479d5 100644
> --- a/drivers/media/usb/au0828/au0828-video.c
> +++ b/drivers/media/usb/au0828/au0828-video.c
> @@ -602,10 +602,7 @@ static inline int au0828_isoc_copy(struct au0828_dev *dev, struct urb *urb)
> vbi_field_size = dev->vbi_width * dev->vbi_height * 2;
> if (dev->vbi_read < vbi_field_size) {
> remain = vbi_field_size - dev->vbi_read;
> - if (len < remain)
> - lencopy = len;
> - else
> - lencopy = remain;
> + lencopy = umin(len, remain);
>
> if (vbi_buf != NULL)
> au0828_copy_vbi(dev, vbi_dma_q, vbi_buf, p,
>
Powered by blists - more mailing lists