lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7ff5f190c66159773c67a1b4fc73e00751fb9c28.camel@nxp.com>
Date:   Thu, 11 Mar 2021 09:12:31 +0000
From:   Mirela Rabulea <mirela.rabulea@....com>
To:     "p.zabel@...gutronix.de" <p.zabel@...gutronix.de>,
        "mchehab@...nel.org" <mchehab@...nel.org>,
        "shawnguo@...nel.org" <shawnguo@...nel.org>,
        "robh+dt@...nel.org" <robh+dt@...nel.org>,
        "hverkuil-cisco@...all.nl" <hverkuil-cisco@...all.nl>
CC:     dl-linux-imx <linux-imx@....com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "laurent.pinchart+renesas@...asonboard.com" 
        <laurent.pinchart+renesas@...asonboard.com>,
        Aisheng Dong <aisheng.dong@....com>,
        Laurentiu Palcu <laurentiu.palcu@....com>,
        "linux-media@...r.kernel.org" <linux-media@...r.kernel.org>,
        Robert Chiras <robert.chiras@....com>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "paul.kocialkowski@...tlin.com" <paul.kocialkowski@...tlin.com>,
        "mark.rutland@....com" <mark.rutland@....com>,
        "niklas.soderlund+renesas@...natech.se" 
        <niklas.soderlund+renesas@...natech.se>,
        Daniel Baluta <daniel.baluta@....com>,
        "dafna.hirschfeld@...labora.com" <dafna.hirschfeld@...labora.com>,
        "ezequiel@...labora.com" <ezequiel@...labora.com>,
        "s.hauer@...gutronix.de" <s.hauer@...gutronix.de>
Subject: Re: [EXT] Re: [PATCH v9 6/8] media: imx-jpeg: Add V4L2 driver for
 i.MX8 JPEG Encoder/Decoder

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>
> 
> > +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;
> 
> > +     },
> > +     {
> > +             .compatible = "nxp,imx8qxp-jpgenc",
> > +             .data       = (void *)MXC_JPEG_ENCODE,
> 
>                 .data = &mxc_encode_mode;
> 
> > +     },
> > +     { },
> > +};
> 
> <snip>
> 
> > +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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ