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] [day] [month] [year] [list]
Message-ID: <20151102000504.2e614e72@bbrezillon>
Date:	Mon, 2 Nov 2015 00:05:04 +0100
From:	Boris Brezillon <boris.brezillon@...e-electrons.com>
To:	David Woodhouse <dwmw2@...radead.org>,
	Brian Norris <computersforpeace@...il.com>,
	linux-mtd@...ts.infradead.org
Cc:	Ezequiel Garcia <ezequiel@...guardiasur.com.ar>,
	Marek Vasut <marex@...x.de>,
	Scott Wood <scottwood@...escale.com>,
	Josh Wu <josh.wu@...el.com>,
	Robert Jarzmik <robert.jarzmik@...e.fr>,
	Kyungmin Park <kyungmin.park@...sung.com>,
	Han Xu <han.xu@...escale.com>, Stefan Agner <stefan@...er.ch>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 12/11] mtd: nand: convert to nand_get_flash_node()

Oops, this patch was meant to be sent in reply to your "mtd: migrate
'of_node' handling to core, not in mtd_part_parser_data" series. Sorry
for the noise.

On Mon,  2 Nov 2015 00:02:34 +0100
Boris Brezillon <boris.brezillon@...e-electrons.com> wrote:

> Used semantic patch with 'make coccicheck MODE=patch COCCI=script.cocci':
> 
> ---8<----
> virtual patch
> 
> @@
> struct nand_chip c;
> struct nand_chip *cp;
> @@
> (
> -(cp)->flash_node
> +nand_get_flash_node(cp)
> |
> -(c).flash_node
> +nand_get_flash_node(&c)
> )
> ---8<----
> 
> Signed-off-by: Boris Brezillon <boris.brezillon@...e-electrons.com>
> ---
> Hi Brian,
> 
> I think this patch could be part of your series too.
> 
> Best Regards,
> 
> Boris
> 
>  drivers/mtd/nand/brcmnand/brcmnand.c | 2 +-
>  drivers/mtd/nand/nand_base.c         | 6 +++---
>  drivers/mtd/nand/vf610_nfc.c         | 6 +++---
>  3 files changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/mtd/nand/brcmnand/brcmnand.c b/drivers/mtd/nand/brcmnand/brcmnand.c
> index a37659d..2a437c7 100644
> --- a/drivers/mtd/nand/brcmnand/brcmnand.c
> +++ b/drivers/mtd/nand/brcmnand/brcmnand.c
> @@ -1816,7 +1816,7 @@ static int brcmnand_setup_dev(struct brcmnand_host *host)
>  
>  	memset(cfg, 0, sizeof(*cfg));
>  
> -	ret = of_property_read_u32(chip->flash_node,
> +	ret = of_property_read_u32(nand_get_flash_node(chip),
>  				   "brcm,nand-oob-sector-size",
>  				   &oob_sector);
>  	if (ret) {
> diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
> index 939ab3d..4ac4efe 100644
> --- a/drivers/mtd/nand/nand_base.c
> +++ b/drivers/mtd/nand/nand_base.c
> @@ -3989,11 +3989,11 @@ int nand_scan_ident(struct mtd_info *mtd, int maxchips,
>  	struct nand_flash_dev *type;
>  	int ret;
>  
> -	if (chip->flash_node) {
> +	if (nand_get_flash_node(chip)) {
>  		/* MTD can automatically handle DT partitions, etc. */
> -		mtd_set_of_node(mtd, chip->flash_node);
> +		mtd_set_of_node(mtd, nand_get_flash_node(chip));
>  
> -		ret = nand_dt_init(mtd, chip, chip->flash_node);
> +		ret = nand_dt_init(mtd, chip, nand_get_flash_node(chip));
>  		if (ret)
>  			return ret;
>  	}
> diff --git a/drivers/mtd/nand/vf610_nfc.c b/drivers/mtd/nand/vf610_nfc.c
> index b6df4c6..1c86c6b 100644
> --- a/drivers/mtd/nand/vf610_nfc.c
> +++ b/drivers/mtd/nand/vf610_nfc.c
> @@ -707,7 +707,7 @@ static int vf610_nfc_probe(struct platform_device *pdev)
>  	for_each_available_child_of_node(nfc->dev->of_node, child) {
>  		if (of_device_is_compatible(child, "fsl,vf610-nfc-nandcs")) {
>  
> -			if (chip->flash_node) {
> +			if (nand_get_flash_node(chip)) {
>  				dev_err(nfc->dev,
>  					"Only one NAND chip supported!\n");
>  				err = -EINVAL;
> @@ -718,7 +718,7 @@ static int vf610_nfc_probe(struct platform_device *pdev)
>  		}
>  	}
>  
> -	if (!chip->flash_node) {
> +	if (!nand_get_flash_node(chip)) {
>  		dev_err(nfc->dev, "NAND chip sub-node missing!\n");
>  		err = -ENODEV;
>  		goto err_clk;
> @@ -814,7 +814,7 @@ static int vf610_nfc_probe(struct platform_device *pdev)
>  	return mtd_device_register(mtd, NULL, 0);
>  
>  error:
> -	of_node_put(chip->flash_node);
> +	of_node_put(nand_get_flash_node(chip));
>  err_clk:
>  	clk_disable_unprepare(nfc->clk);
>  	return err;



-- 
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ