media: verisilicon: Use fourcc format string
authorMichael Tretter <m.tretter@pengutronix.de>
Tue, 28 May 2024 13:03:14 +0000 (15:03 +0200)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Fri, 9 Aug 2024 05:56:37 +0000 (07:56 +0200)
There is a fourcc format string for printing formats. Use it instead of
open coding the conversion.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/platform/verisilicon/hantro_v4l2.c

index df6f2536263bb61f26ec2e7742a1f38a2b56e91a..62d3962c18d992e04775e313db8f70dd16f23d67 100644 (file)
@@ -303,11 +303,7 @@ static int hantro_try_fmt(const struct hantro_ctx *ctx,
 
        coded = capture == ctx->is_encoder;
 
-       vpu_debug(4, "trying format %c%c%c%c\n",
-                 (pix_mp->pixelformat & 0x7f),
-                 (pix_mp->pixelformat >> 8) & 0x7f,
-                 (pix_mp->pixelformat >> 16) & 0x7f,
-                 (pix_mp->pixelformat >> 24) & 0x7f);
+       vpu_debug(4, "trying format %p4cc\n", &pix_mp->pixelformat);
 
        fmt = hantro_find_format(ctx, pix_mp->pixelformat);
        if (!fmt) {