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]
Date:   Thu, 11 Mar 2021 08:27:18 +0100
From:   Hans Verkuil <hverkuil-cisco@...all.nl>
To:     "Mirela Rabulea (OSS)" <mirela.rabulea@....nxp.com>,
        mchehab@...nel.org, shawnguo@...nel.org, robh+dt@...nel.org,
        p.zabel@...gutronix.de
Cc:     paul.kocialkowski@...tlin.com, linux-media@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-imx@....com,
        s.hauer@...gutronix.de, aisheng.dong@....com,
        daniel.baluta@....com, robert.chiras@....com,
        laurentiu.palcu@....com, mark.rutland@....com,
        devicetree@...r.kernel.org, ezequiel@...labora.com,
        laurent.pinchart+renesas@...asonboard.com,
        niklas.soderlund+renesas@...natech.se,
        dafna.hirschfeld@...labora.com,
        Mirela Rabulea <mirela.rabulea@....com>
Subject: Re: [PATCH v9 6/8] media: imx-jpeg: Add V4L2 driver for i.MX8 JPEG
 Encoder/Decoder

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.

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