[Cocci] [RFC] drop owner assignment from platform_drivers

2014-10-10 Thread Wolfram Sang
Hi, people found out that for platform_driver, we don't need to set the .owner field because this is done by the platform driver core. So far, so good. However, now I got patches removing the .owner field for this single i2c driver or for that one. To prevent getting thousands of patches fixing si

Re: [Cocci] [RFC] drop owner assignment from platform_drivers

2014-10-10 Thread Julia Lawall
> @match1@ > declarer name module_platform_driver; > declarer name module_platform_driver_probe; > identifier __driver; > @@ > ( > module_platform_driver(__driver); > | > module_platform_driver_probe(__driver, ...); > ) > > @fix1 depends on match1@ > identifier match1.__driver; > @@ >

Re: [Cocci] [RFC] drop owner assignment from platform_drivers

2014-10-10 Thread Arnd Bergmann
On Friday 10 October 2014 09:24:39 Wolfram Sang wrote: > people found out that for platform_driver, we don't need to set the > .owner field because this is done by the platform driver core. So far, > so good. However, now I got patches removing the .owner field for this > single i2c driver or for t

Re: [Cocci] [RFC] drop owner assignment from platform_drivers

2014-10-10 Thread Russell King - ARM Linux
On Fri, Oct 10, 2014 at 09:24:39AM +0200, Wolfram Sang wrote: > people found out that for platform_driver, we don't need to set the > .owner field because this is done by the platform driver core. So far, > so good. However, now I got patches removing the .owner field for this > single i2c driver o

Re: [Cocci] [RFC] drop owner assignment from platform_drivers

2014-10-10 Thread Wolfram Sang
> The semantic patch looks fine. Wow, nothing to improve on the semantic patch? Now I am proud :) Thanks Julia for your support, as always! > If you think that it would be useful to have this in the Linux kernel, so > people don't add the owner initializer back in the future, you can try > > co

Re: [Cocci] [RFC] drop owner assignment from platform_drivers

2014-10-10 Thread Wolfram Sang
Hi Arnd, thanks for taking a look! On Fri, Oct 10, 2014 at 10:30:08AM +0200, Arnd Bergmann wrote: > On Friday 10 October 2014 09:24:39 Wolfram Sang wrote: > > people found out that for platform_driver, we don't need to set the > > .owner field because this is done by the platform driver core. So

Re: [Cocci] [RFC] drop owner assignment from platform_drivers

2014-10-10 Thread Wolfram Sang
On Fri, Oct 10, 2014 at 09:36:27AM +0100, Russell King - ARM Linux wrote: > On Fri, Oct 10, 2014 at 09:24:39AM +0200, Wolfram Sang wrote: > > people found out that for platform_driver, we don't need to set the > > .owner field because this is done by the platform driver core. So far, > > so good. H

Re: [Cocci] [RFC] drop owner assignment from platform_drivers

2014-10-10 Thread Arnd Bergmann
On Friday 10 October 2014 20:12:21 Wolfram Sang wrote: > Hi Arnd, > > thanks for taking a look! > > On Fri, Oct 10, 2014 at 10:30:08AM +0200, Arnd Bergmann wrote: > > On Friday 10 October 2014 09:24:39 Wolfram Sang wrote: > > > people found out that for platform_driver, we don't need to set the >

Re: [Cocci] [RFC] drop owner assignment from platform_drivers

2014-10-10 Thread Arnd Bergmann
On Friday 10 October 2014 20:26:05 Wolfram Sang wrote: > > You got me wondering, though, that it could not be correct to call > platform_driver_register() from the platform core instead of module > init. I will check tomorrow. Still, this would be a bug independent of > my series. Although I'd nee

Re: [Cocci] [RFC] drop owner assignment from platform_drivers

2014-10-10 Thread Russell King - ARM Linux
On Fri, Oct 10, 2014 at 08:26:05PM +0200, Wolfram Sang wrote: > platform_create_bundle() calls platform_driver_probe(). > platform_driver_probe() calls platform_driver_register(). > platform_driver_register() modifies driver.owner. > > So, it is correct from the point of view that it doesn't make

Re: [Cocci] [RFC] drop owner assignment from platform_drivers

2014-10-11 Thread Wolfram Sang
> > You got me wondering, though, that it could not be correct to call > > platform_driver_register() from the platform core instead of module > > init. I will check tomorrow. Still, this would be a bug independent of > > my series. Although I'd need to respin it if platform_driver_probe() > > nee

Re: [Cocci] [RFC] drop owner assignment from platform_drivers

2014-10-11 Thread Russell King - ARM Linux
On Sat, Oct 11, 2014 at 06:56:51PM +0200, Wolfram Sang wrote: > > > > You got me wondering, though, that it could not be correct to call > > > platform_driver_register() from the platform core instead of module > > > init. I will check tomorrow. Still, this would be a bug independent of > > > my s

Re: [Cocci] [RFC] drop owner assignment from platform_drivers

2014-10-11 Thread Greg KH
On Sat, Oct 11, 2014 at 06:56:51PM +0200, Wolfram Sang wrote: > > > > You got me wondering, though, that it could not be correct to call > > > platform_driver_register() from the platform core instead of module > > > init. I will check tomorrow. Still, this would be a bug independent of > > > my s

Re: [Cocci] [RFC] drop owner assignment from platform_drivers

2014-10-11 Thread Wolfram Sang
> I missed the one code path you pointed out, and that should be fixed, > but that doesn't mean that the original patch should be reverted, as it > is the way we want things to be, let's just fix up the bug and move on. OK, that is a clear statement. So, what is your opinion on the original clea

Re: [Cocci] [RFC] drop owner assignment from platform_drivers

2014-10-12 Thread Greg KH
On Sun, Oct 12, 2014 at 07:51:46AM +0200, Wolfram Sang wrote: > > > I missed the one code path you pointed out, and that should be fixed, > > but that doesn't mean that the original patch should be reverted, as it > > is the way we want things to be, let's just fix up the bug and move on. > > OK,

Re: [Cocci] [RFC] drop owner assignment from platform_drivers

2014-10-12 Thread Wolfram Sang
> > So, what is your opinion on the original cleanup series removing > > unnecessary '.owner = THIS_MODULE' lines in drivers? Helpful? Noise? > > Helpful, please do it. I can take it all through my driver-core tree if > you want, that might make things easier for others. Thanks, that might make