Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1550688
| From | Russell King - ARM Linux <linux@armlinux.org.uk> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 2/2] arm: perf: Mark as non-removable |
| Date | 2017-01-04 12:50 +0100 |
| Message-ID | <sVSeS-47P-21@gated-at.bofh.it> (permalink) |
| References | <sQQGK-52H-37@gated-at.bofh.it> <sQQGK-52H-35@gated-at.bofh.it> <sRklr-6Xd-3@gated-at.bofh.it> <sVQ3n-2IT-7@gated-at.bofh.it> <sVS5c-44p-35@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Jan 04, 2017 at 11:30:25AM +0000, Mark Rutland wrote: > On Wed, Jan 04, 2017 at 10:19:46AM +0100, Alexander Stein wrote: > > I'm not sure if the change above works with remove functions set in struct > > bus_type too. > > But on the other hand this would hide errors in drivers which are actually > > removable but do not cleanup properly which DEBUG_TEST_DRIVER_REMOVE tries to > > detect. > > By setting .suppress_bind_attrs = true explicitely you state "This > > driver cannot be removed!", so the remove callback is not missing by accident. > > I'm not sure I follow. If the remove callback is accidentally missing, > the driver is not "actually removable" today -- there's either no remove > code, or it's not been wired up (the latter of which will likely result > in a compiler warning about an unused function). > > Aborting the remove early in those cases is much safer than forcefully > removing a driver without a remove callback. Drivers without a remove function may be removable - there's more layers than just the driver - there's the bus layer as well, which may or may not direct to a private-bus pointer. There's no real way for the core driver model code to know whether the lack of the ->remove in the struct device_driver is something that prevents a driver being removed, or whether it's handled via some other method. Eg, platform drivers. -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up according to speedtest.net.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH v2 2/2] arm: perf: Mark as non-removable Alexander Stein <alexander.stein@systec-electronic.com> - 2017-01-04 10:30 +0100
Re: [PATCH v2 2/2] arm: perf: Mark as non-removable Mark Rutland <mark.rutland@arm.com> - 2017-01-04 12:40 +0100
Re: [PATCH v2 2/2] arm: perf: Mark as non-removable Russell King - ARM Linux <linux@armlinux.org.uk> - 2017-01-04 12:50 +0100
Re: [PATCH v2 2/2] arm: perf: Mark as non-removable Mark Rutland <mark.rutland@arm.com> - 2017-01-04 12:50 +0100
Re: [PATCH v2 2/2] arm: perf: Mark as non-removable Will Deacon <will.deacon@arm.com> - 2017-01-04 19:30 +0100
csiph-web