Patchwork mtd: ndfc: fix typo in structure dereference

login
register
mail settings
Submitter Tony Breeds
Date Nov. 22, 2011, 4:39 a.m.
Message ID <20111122043904.GA22504@thor.bakeyournoodle.com>
Download mbox | patch
Permalink /patch/127000/
State Accepted
Commit 629be5f275ddf0791614f8cbdafc11bde4247850
Headers show

Comments

Tony Breeds - Nov. 22, 2011, 4:39 a.m.
In commit 9d7948c50055e74b693ce9e99a709b2e5bbc1942 (mtd: ndfc: use
ofpart through generic parsing) we dereference a non pointer type
causing the following compiler error:
drivers/mtd/nand/ndfc.c: In function 'ndfc_chip_init':
drivers/mtd/nand/ndfc.c:191: error: invalid type argument of '->' (have 'struct mtd_part_parser_data')

Fix that.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
---
 drivers/mtd/nand/ndfc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Dmitry Eremin-Solenikov - Nov. 22, 2011, 8:56 a.m.
On 11/22/11, Tony Breeds <tony@bakeyournoodle.com> wrote:
> In commit 9d7948c50055e74b693ce9e99a709b2e5bbc1942 (mtd: ndfc: use
> ofpart through generic parsing) we dereference a non pointer type
> causing the following compiler error:
> drivers/mtd/nand/ndfc.c: In function 'ndfc_chip_init':
> drivers/mtd/nand/ndfc.c:191: error: invalid type argument of '->' (have
> 'struct mtd_part_parser_data')
>
> Fix that.
>
> Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>

Acked-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>

Sometimes I wander about this serie. I tried to test most
of the combinations, I could test at that momemt. The patches
were split in simple chunks to simplify review and testing. They
waited in linux-next for 2 or 3 releases. And I still see problems
with those patches.


> ---
>  drivers/mtd/nand/ndfc.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c
> index ee17139..f8aacf4 100644
> --- a/drivers/mtd/nand/ndfc.c
> +++ b/drivers/mtd/nand/ndfc.c
> @@ -188,7 +188,7 @@ static int ndfc_chip_init(struct ndfc_controller *ndfc,
>  	if (!flash_np)
>  		return -ENODEV;
>
> -	ppdata->of_node = flash_np;
> +	ppdata.of_node = flash_np;
>  	ndfc->mtd.name = kasprintf(GFP_KERNEL, "%s.%s",
>  			dev_name(&ndfc->ofdev->dev), flash_np->name);
>  	if (!ndfc->mtd.name) {
> --
> 1.7.6.4
>
> Yours Tony
>
Tony Breeds - Nov. 22, 2011, 9:37 p.m.
On Tue, Nov 22, 2011 at 12:56:43PM +0400, Dmitry Eremin-Solenikov wrote:
> On 11/22/11, Tony Breeds <tony@bakeyournoodle.com> wrote:
> > In commit 9d7948c50055e74b693ce9e99a709b2e5bbc1942 (mtd: ndfc: use
> > ofpart through generic parsing) we dereference a non pointer type
> > causing the following compiler error:
> > drivers/mtd/nand/ndfc.c: In function 'ndfc_chip_init':
> > drivers/mtd/nand/ndfc.c:191: error: invalid type argument of '->' (have
> > 'struct mtd_part_parser_data')
> >
> > Fix that.
> >
> > Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
> 
> Acked-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>

Thanks.
 
> Sometimes I wander about this serie. I tried to test most
> of the combinations, I could test at that momemt. The patches
> were split in simple chunks to simplify review and testing. They
> waited in linux-next for 2 or 3 releases. And I still see problems
> with those patches.

I actually found the problem in linux-next sometime ago, and I swear I
posted this patch but clearly I didn't.

linux-next is a great tool but even linux-next doesn't test all the
defconfigs in the kernel and therefore misses some code.

I'll talk to Stephen about adding something that will run over this
code.

Yours Tony
Artem Bityutskiy - Nov. 22, 2011, 9:42 p.m.
On Tue, 2011-11-22 at 15:39 +1100, Tony Breeds wrote:
> In commit 9d7948c50055e74b693ce9e99a709b2e5bbc1942 (mtd: ndfc: use
> ofpart through generic parsing) we dereference a non pointer type
> causing the following compiler error:
> drivers/mtd/nand/ndfc.c: In function 'ndfc_chip_init':
> drivers/mtd/nand/ndfc.c:191: error: invalid type argument of '->' (have 'struct mtd_part_parser_data')
> 
> Fix that.
> 
> Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>

Pushed to l2-mtd-2.6.git, thanks.

This has to be sent to Linus this release cycle.

Artem.

Patch

diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c
index ee17139..f8aacf4 100644
--- a/drivers/mtd/nand/ndfc.c
+++ b/drivers/mtd/nand/ndfc.c
@@ -188,7 +188,7 @@  static int ndfc_chip_init(struct ndfc_controller *ndfc,
 	if (!flash_np)
 		return -ENODEV;
 
-	ppdata->of_node = flash_np;
+	ppdata.of_node = flash_np;
 	ndfc->mtd.name = kasprintf(GFP_KERNEL, "%s.%s",
 			dev_name(&ndfc->ofdev->dev), flash_np->name);
 	if (!ndfc->mtd.name) {