Skip to contentSkip to conversation

mtd: ndfc: fix typo in structure dereference

PATCH Applied Tony Breeds 3 participants 4 messages Nov 22, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtd: ndfc: fix typo in structure dereference

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.

---
 drivers/mtd/nand/ndfc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mtd/nand/ndfc.c +1 -1
index ee17139..f8aacf4 100644
@@ -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) {
Signature · 3 lines
1.7.6.4

Yours Tony
Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Tony Breeds

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.

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.

Quoted 22 lines
---
 drivers/mtd/nand/ndfc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mtd/nand/ndfc.c +1 -2
index ee17139..f8aacf4 100644
@@ -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

Signature · 2 lines
With best wishes
Dmitry
#2 lore raw
Quoted 8 lines · Dmitry Eremin-Solenikov
Quoted 7 lines · Tony Breeds

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')

Quoted 5 lines
Quoted 3 lines

Fix that.

Thanks.

Quoted 5 lines

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

#3 lore raw
In reply to Tony Breeds
Quoted 9 lines · Tony Breeds

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.

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

This has to be sent to Linus this release cycle.

Artem.