Re: [PATCH 1/2] mtd: delete unneeded call to platform_get_drvdata

2014-05-20 Thread Dan Carpenter
On Tue, May 20, 2014 at 01:35:31AM -0700, Brian Norris wrote: > > > > static int bf5xx_nand_resume(struct platform_device *dev) > > > > { > > > > - struct bf5xx_nand_info *info = platform_get_drvdata(dev); > > > > - > > > > return 0; > > > > > > In this case bf5xx_nand_suspend/resum

Re: [PATCH 1/2] mtd: delete unneeded call to platform_get_drvdata

2014-05-20 Thread Brian Norris
+ Mike On Sat, May 17, 2014 at 03:12:02PM +0800, Julia Lawall wrote: > On Sat, 17 May 2014, Fabio Estevam wrote: > > On Sat, May 17, 2014 at 3:32 AM, Julia Lawall wrote: > > > From: Julia Lawall > > > > > > Platform_get_drvdata is an accessor function, and has no purpose if its > > > result is n

Re: [PATCH 1/2] mtd: delete unneeded call to platform_get_drvdata

2014-05-17 Thread Julia Lawall
On Sat, 17 May 2014, Fabio Estevam wrote: > On Sat, May 17, 2014 at 3:32 AM, Julia Lawall wrote: > > From: Julia Lawall > > > > Platform_get_drvdata is an accessor function, and has no purpose if its > > result is not used. > > > > The semantic patch that fixes this problem is as follows: > >

Re: [PATCH 1/2] mtd: delete unneeded call to platform_get_drvdata

2014-05-17 Thread Fabio Estevam
On Sat, May 17, 2014 at 3:32 AM, Julia Lawall wrote: > From: Julia Lawall > > Platform_get_drvdata is an accessor function, and has no purpose if its > result is not used. > > The semantic patch that fixes this problem is as follows: > (http://coccinelle.lip6.fr/) > > // > @@ > identifier x; > t

[PATCH 1/2] mtd: delete unneeded call to platform_get_drvdata

2014-05-16 Thread Julia Lawall
From: Julia Lawall Platform_get_drvdata is an accessor function, and has no purpose if its result is not used. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier x; type T; @@ - T x = platform_get_drvdata(...); ... when != x // Signed-off-