Re: [PATCHv3 5/5] misc: gehc-achc: new driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 28, 2021 at 04:06:54PM +0200, Sebastian Reichel wrote:
> > > +	/*
> > > +	 * The sysfs properties are bound to the dummy device, since the main device already
> > > +	 * uses drvdata assigned by the spidev driver.
> > > +	 */
> > > +	spi_set_drvdata(achc->ezport, achc);
> > > +	ret = devm_device_add_group(&achc->ezport->dev, &gehc_achc_attr_group);
> > 
> > You just raced and lost. Please use the default groups attribute for
> > your driver instead of this. Or properly attach it to the device some
> > other way, but what you have done here does not work, sorry.
> 
> I've been told the race got fixed from kernel POV?
> 
> https://lore.kernel.org/linux-input/20200521055400.GX89269@dtor-ws/

Kind of, it's still not good to do this "by hand", the driver core
should do it for you.

> If this is still an issue, I think most (all?) existing instances of
> devm_device_add_group() are a problem and it makes sense to have a
> checkpatch warning for it.

Yes, I need to just get rid of that call entirely.  I'll sick one of my
interns on it...

thanks,

greg k-h



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux