Thread (13 messages) 13 messages, 4 authors, 2021-03-12

Re: [EXT] Re: [PATCH v9 6/8] media: imx-jpeg: Add V4L2 driver for i.MX8 JPEG Encoder/Decoder

From: Mirela Rabulea <mirela.rabulea@nxp.com>
Date: 2021-03-11 09:13:20
Also in: linux-media, lkml

On Thu, 2021-03-11 at 08:27 +0100, Hans Verkuil wrote:
Caution: EXT Email

Hi Mirela,

On 11/03/2021 01:28, Mirela Rabulea (OSS) wrote:

<snip>
quoted
+static const struct of_device_id mxc_jpeg_match[] = {
+     {
+             .compatible = "nxp,imx8qxp-jpgdec",
+             .data       = (void *)MXC_JPEG_DECODE,
Don't do this, just say:

static const int mxc_decode_mode = MXC_JPEG_DECODE;
static const int mxc_encode_mode = MXC_JPEG_ENCODE;

and point to that:

                .data = &mxc_decode_mode;
quoted
+     },
+     {
+             .compatible = "nxp,imx8qxp-jpgenc",
+             .data       = (void *)MXC_JPEG_ENCODE,
                .data = &mxc_encode_mode;
quoted
+     },
+     { },
+};
<snip>
quoted
+static int mxc_jpeg_probe(struct platform_device *pdev)
+{
+     struct mxc_jpeg_dev *jpeg;
+     struct device *dev = &pdev->dev;
+     struct resource *res;
+     int dec_irq;
+     int ret;
+     int mode;
+     const struct of_device_id *of_id;
+     unsigned int slot;
+
+     of_id = of_match_node(mxc_jpeg_match, dev->of_node);
+     mode = (int)(u64)of_id->data;
and this becomes:

        mode = *(const int *)of_id->data;

This will solve the kernel test robot warning, and for that matter
the same gcc warnings I get when I compile.
Hi Hans,
thanks for the suggestion, I missed that warning among the verbosity
from the other ones. Perhaps for the future it would be usefull for me
to try and replicate the kernel test robot environment.
 
I sent v9.1 just for this patch.

Regards,
Mirela
Just post a v9.1 for this patch, everything else looks good.

Regards,

        Hans
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help