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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <865dd318-e30e-e747-ea9f-8bbb549d4471@wedev4u.fr>
Date:   Sun, 7 Jan 2018 19:08:19 +0100
From:   Cyrille Pitchen <cyrille.pitchen@...ev4u.fr>
To:     Julia Lawall <Julia.Lawall@...6.fr>, Han Xu <han.xu@....com>
Cc:     kernel-janitors@...r.kernel.org,
        Marek Vasut <marek.vasut@...il.com>,
        David Woodhouse <dwmw2@...radead.org>,
        Brian Norris <computersforpeace@...il.com>,
        Boris Brezillon <boris.brezillon@...e-electrons.com>,
        Richard Weinberger <richard@....at>,
        linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 09/12] mtd: fsl-quadspi: account for const type of
 of_device_id.data

Le 02/01/2018 à 14:28, Julia Lawall a écrit :
> This driver creates a number of const structures that it stores in the
> data field of an of_device_id array.
> 
> The data field of an of_device_id structure has type const void *, so
> there is no need for a const-discarding cast when putting const values
> into such a structure.
> 
> Done using Coccinelle.
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@...6.fr>
> 

Applied to the spi-nor/next branch of linux-mtd

Thanks!

> ---
>  drivers/mtd/spi-nor/fsl-quadspi.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff -u -p a/drivers/mtd/spi-nor/fsl-quadspi.c b/drivers/mtd/spi-nor/fsl-quadspi.c
> --- a/drivers/mtd/spi-nor/fsl-quadspi.c
> +++ b/drivers/mtd/spi-nor/fsl-quadspi.c
> @@ -801,10 +801,10 @@ static int fsl_qspi_nor_setup_last(struc
>  }
>  
>  static const struct of_device_id fsl_qspi_dt_ids[] = {
> -	{ .compatible = "fsl,vf610-qspi", .data = (void *)&vybrid_data, },
> -	{ .compatible = "fsl,imx6sx-qspi", .data = (void *)&imx6sx_data, },
> -	{ .compatible = "fsl,imx7d-qspi", .data = (void *)&imx7d_data, },
> -	{ .compatible = "fsl,imx6ul-qspi", .data = (void *)&imx6ul_data, },
> +	{ .compatible = "fsl,vf610-qspi", .data = &vybrid_data, },
> +	{ .compatible = "fsl,imx6sx-qspi", .data = &imx6sx_data, },
> +	{ .compatible = "fsl,imx7d-qspi", .data = &imx7d_data, },
> +	{ .compatible = "fsl,imx6ul-qspi", .data = &imx6ul_data, },
>  	{ .compatible = "fsl,ls1021a-qspi", .data = (void *)&ls1021a_data, },
>  	{ /* sentinel */ }
>  };
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ