* [PATCH] video: fbdev: i810: remove incorrect __exit markups
@ 2017-03-02 1:31 ` Dmitry Torokhov
2017-03-20 17:19 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Torokhov @ 2017-03-02 1:31 UTC (permalink / raw)
To: Antonino Daplas; +Cc: Bartlomiej Zolnierkiewicz, linux-fbdev, linux-kernel
Even if bus is not hot-pluggable, devices can be unbound from the
driver via sysfs, so we should not be using __exit annotations on
remove() methods. The only exception is drivers registered with
platform_driver_probe() which specifically disables sysfs bind/unbind
attributes.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
drivers/video/fbdev/i810/i810_main.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/video/fbdev/i810/i810_main.c b/drivers/video/fbdev/i810/i810_main.c
index 483ab2592d0c..2488baab7c89 100644
--- a/drivers/video/fbdev/i810/i810_main.c
+++ b/drivers/video/fbdev/i810/i810_main.c
@@ -81,7 +81,7 @@ static u32 voffset;
static int i810fb_cursor(struct fb_info *info, struct fb_cursor *cursor);
static int i810fb_init_pci(struct pci_dev *dev,
const struct pci_device_id *entry);
-static void __exit i810fb_remove_pci(struct pci_dev *dev);
+static void i810fb_remove_pci(struct pci_dev *dev);
static int i810fb_resume(struct pci_dev *dev);
static int i810fb_suspend(struct pci_dev *dev, pm_message_t state);
@@ -128,7 +128,7 @@ static struct pci_driver i810fb_driver = {
.name = "i810fb",
.id_table = i810fb_pci_tbl,
.probe = i810fb_init_pci,
- .remove = __exit_p(i810fb_remove_pci),
+ .remove = i810fb_remove_pci,
.suspend = i810fb_suspend,
.resume = i810fb_resume,
};
@@ -2123,7 +2123,7 @@ static void i810fb_release_resource(struct fb_info *info,
}
-static void __exit i810fb_remove_pci(struct pci_dev *dev)
+static void i810fb_remove_pci(struct pci_dev *dev)
{
struct fb_info *info = pci_get_drvdata(dev);
struct i810fb_par *par = info->par;
--
2.12.0.rc1.440.g5b76565f74-goog
--
Dmitry
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] video: fbdev: i810: remove incorrect __exit markups
2017-03-02 1:31 ` [PATCH] video: fbdev: i810: remove incorrect __exit markups Dmitry Torokhov
@ 2017-03-20 17:19 ` Bartlomiej Zolnierkiewicz
2017-03-20 18:42 ` Dmitry Torokhov
0 siblings, 1 reply; 4+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2017-03-20 17:19 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: Antonino Daplas, linux-fbdev, linux-kernel
On Wednesday, March 01, 2017 05:31:01 PM Dmitry Torokhov wrote:
> Even if bus is not hot-pluggable, devices can be unbound from the
> driver via sysfs, so we should not be using __exit annotations on
> remove() methods. The only exception is drivers registered with
> platform_driver_probe() which specifically disables sysfs bind/unbind
> attributes.
>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Patch queued for 4.12, thanks.
It seems that there are still some fbdev drivers with this issue:
$ git grep __exit_p drivers/video/fbdev/
drivers/video/fbdev/amifb.c: .remove = __exit_p(amifb_remove),
drivers/video/fbdev/atmel_lcdfb.c: .remove = __exit_p(atmel_lcdfb_remove),
drivers/video/fbdev/omap2/omapfb/displays/connector-analog-tv.c: .remove = __exit_p(tvc_remove),
drivers/video/fbdev/omap2/omapfb/displays/connector-dvi.c: .remove = __exit_p(dvic_remove),
drivers/video/fbdev/omap2/omapfb/displays/connector-hdmi.c: .remove = __exit_p(hdmic_remove),
drivers/video/fbdev/omap2/omapfb/displays/encoder-opa362.c: .remove = __exit_p(opa362_remove),
drivers/video/fbdev/omap2/omapfb/displays/encoder-tfp410.c: .remove = __exit_p(tfp410_remove),
drivers/video/fbdev/omap2/omapfb/displays/encoder-tpd12s015.c: .remove = __exit_p(tpd_remove),
drivers/video/fbdev/omap2/omapfb/displays/panel-dpi.c: .remove = __exit_p(panel_dpi_remove),
drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c: .remove = __exit_p(dsicm_remove),
drivers/video/fbdev/omap2/omapfb/displays/panel-sharp-ls037v7dw01.c: .remove = __exit_p(sharp_ls_remove),
drivers/video/fbdev/omap2/omapfb/vrfb.c: .remove = __exit_p(vrfb_remove),
(these drivers don't disable sysfs bind/unbind attributes)
Could you please also take care of fixing them?
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] video: fbdev: i810: remove incorrect __exit markups
2017-03-20 17:19 ` Bartlomiej Zolnierkiewicz
@ 2017-03-20 18:42 ` Dmitry Torokhov
2017-03-20 18:54 ` Bartlomiej Zolnierkiewicz
0 siblings, 1 reply; 4+ messages in thread
From: Dmitry Torokhov @ 2017-03-20 18:42 UTC (permalink / raw)
To: Bartlomiej Zolnierkiewicz; +Cc: Antonino Daplas, linux-fbdev, linux-kernel
Hi Bartlomiej,
On Mon, Mar 20, 2017 at 06:19:17PM +0100, Bartlomiej Zolnierkiewicz wrote:
> On Wednesday, March 01, 2017 05:31:01 PM Dmitry Torokhov wrote:
> > Even if bus is not hot-pluggable, devices can be unbound from the
> > driver via sysfs, so we should not be using __exit annotations on
> > remove() methods. The only exception is drivers registered with
> > platform_driver_probe() which specifically disables sysfs bind/unbind
> > attributes.
> >
> > Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
>
> Patch queued for 4.12, thanks.
>
> It seems that there are still some fbdev drivers with this issue:
I do not think so:
>
> $ git grep __exit_p drivers/video/fbdev/
> drivers/video/fbdev/amifb.c: .remove = __exit_p(amifb_remove),
Registered as module_platform_driver_probe(), which ends up suppressing
sysfs bind/unbind attributes.
> drivers/video/fbdev/atmel_lcdfb.c: .remove = __exit_p(atmel_lcdfb_remove),
Registered as module_platform_driver_probe(), which ends up suppressing
sysfs bind/unbind attributes.
> drivers/video/fbdev/omap2/omapfb/displays/connector-analog-tv.c: .remove = __exit_p(tvc_remove),
> drivers/video/fbdev/omap2/omapfb/displays/connector-dvi.c: .remove = __exit_p(dvic_remove),
> drivers/video/fbdev/omap2/omapfb/displays/connector-hdmi.c: .remove = __exit_p(hdmic_remove),
> drivers/video/fbdev/omap2/omapfb/displays/encoder-opa362.c: .remove = __exit_p(opa362_remove),
> drivers/video/fbdev/omap2/omapfb/displays/encoder-tfp410.c: .remove = __exit_p(tfp410_remove),
> drivers/video/fbdev/omap2/omapfb/displays/encoder-tpd12s015.c: .remove = __exit_p(tpd_remove),
> drivers/video/fbdev/omap2/omapfb/displays/panel-dpi.c: .remove = __exit_p(panel_dpi_remove),
> drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c: .remove = __exit_p(dsicm_remove),
> drivers/video/fbdev/omap2/omapfb/displays/panel-sharp-ls037v7dw01.c: .remove = __exit_p(sharp_ls_remove),
As far as I can see all omapfb/displays/ drivers explicitly disable
bind/unbind attributes by setting:
.suppress_bind_attrs = true,
> drivers/video/fbdev/omap2/omapfb/vrfb.c: .remove = __exit_p(vrfb_remove),
Registered as module_platform_driver_probe(), which ends up suppressing
sysfs bind/unbind attributes.
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] video: fbdev: i810: remove incorrect __exit markups
2017-03-20 18:42 ` Dmitry Torokhov
@ 2017-03-20 18:54 ` Bartlomiej Zolnierkiewicz
0 siblings, 0 replies; 4+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2017-03-20 18:54 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: Antonino Daplas, linux-fbdev, linux-kernel
On Monday, March 20, 2017 11:42:56 AM Dmitry Torokhov wrote:
> Hi Bartlomiej,
>
> On Mon, Mar 20, 2017 at 06:19:17PM +0100, Bartlomiej Zolnierkiewicz wrote:
> > On Wednesday, March 01, 2017 05:31:01 PM Dmitry Torokhov wrote:
> > > Even if bus is not hot-pluggable, devices can be unbound from the
> > > driver via sysfs, so we should not be using __exit annotations on
> > > remove() methods. The only exception is drivers registered with
> > > platform_driver_probe() which specifically disables sysfs bind/unbind
> > > attributes.
> > >
> > > Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> >
> > Patch queued for 4.12, thanks.
> >
> > It seems that there are still some fbdev drivers with this issue:
>
> I do not think so:
>
> >
> > $ git grep __exit_p drivers/video/fbdev/
> > drivers/video/fbdev/amifb.c: .remove = __exit_p(amifb_remove),
>
> Registered as module_platform_driver_probe(), which ends up suppressing
> sysfs bind/unbind attributes.
>
> > drivers/video/fbdev/atmel_lcdfb.c: .remove = __exit_p(atmel_lcdfb_remove),
>
> Registered as module_platform_driver_probe(), which ends up suppressing
> sysfs bind/unbind attributes.
>
> > drivers/video/fbdev/omap2/omapfb/displays/connector-analog-tv.c: .remove = __exit_p(tvc_remove),
> > drivers/video/fbdev/omap2/omapfb/displays/connector-dvi.c: .remove = __exit_p(dvic_remove),
> > drivers/video/fbdev/omap2/omapfb/displays/connector-hdmi.c: .remove = __exit_p(hdmic_remove),
> > drivers/video/fbdev/omap2/omapfb/displays/encoder-opa362.c: .remove = __exit_p(opa362_remove),
> > drivers/video/fbdev/omap2/omapfb/displays/encoder-tfp410.c: .remove = __exit_p(tfp410_remove),
> > drivers/video/fbdev/omap2/omapfb/displays/encoder-tpd12s015.c: .remove = __exit_p(tpd_remove),
> > drivers/video/fbdev/omap2/omapfb/displays/panel-dpi.c: .remove = __exit_p(panel_dpi_remove),
> > drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c: .remove = __exit_p(dsicm_remove),
> > drivers/video/fbdev/omap2/omapfb/displays/panel-sharp-ls037v7dw01.c: .remove = __exit_p(sharp_ls_remove),
>
> As far as I can see all omapfb/displays/ drivers explicitly disable
> bind/unbind attributes by setting:
>
> .suppress_bind_attrs = true,
>
>
> > drivers/video/fbdev/omap2/omapfb/vrfb.c: .remove = __exit_p(vrfb_remove),
>
> Registered as module_platform_driver_probe(), which ends up suppressing
> sysfs bind/unbind attributes.
You're right of course, thanks for explaining this and auditing all fbdev
drivers.
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-03-20 18:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20170302013109epcas3p3ae90f60d7aa8f14bb09eb5ec342cfaeb@epcas3p3.samsung.com>
2017-03-02 1:31 ` [PATCH] video: fbdev: i810: remove incorrect __exit markups Dmitry Torokhov
2017-03-20 17:19 ` Bartlomiej Zolnierkiewicz
2017-03-20 18:42 ` Dmitry Torokhov
2017-03-20 18:54 ` Bartlomiej Zolnierkiewicz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).