mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 19:43:40 +02:00
media: staging: media: tegra-video: Use swap macro
Makes the code simpler and cocci happier: drivers/staging/media/tegra-video/tegra20.c:324:44-45: WARNING opportunity for swap() Link: https://lore.kernel.org/linux-media/20240429-fix-cocci-v3-10-3c4865f5a4b0@chromium.org Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
parent
e9a8446326
commit
6a56625b9e
|
|
@ -317,13 +317,8 @@ static void tegra20_channel_queue_setup(struct tegra_vi_channel *chan)
|
|||
chan->addr_offset_v = chan->addr_offset_u + stride * height / 4;
|
||||
|
||||
/* For YVU420, we swap the locations of the U and V planes. */
|
||||
if (chan->format.pixelformat == V4L2_PIX_FMT_YVU420) {
|
||||
unsigned long temp;
|
||||
|
||||
temp = chan->addr_offset_u;
|
||||
chan->addr_offset_u = chan->addr_offset_v;
|
||||
chan->addr_offset_v = temp;
|
||||
}
|
||||
if (chan->format.pixelformat == V4L2_PIX_FMT_YVU420)
|
||||
swap(chan->addr_offset_u, chan->addr_offset_v);
|
||||
|
||||
chan->start_offset_u = chan->addr_offset_u;
|
||||
chan->start_offset_v = chan->addr_offset_v;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user