Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1604825 > unrolled thread

Re: [PATCH] video: fbdev: i810: remove incorrect __exit markups

Started byBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
First post2017-03-20 18:20 +0100
Last post2017-03-20 20:00 +0100
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] video: fbdev: i810: remove incorrect __exit markups Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> - 2017-03-20 18:20 +0100
    Re: [PATCH] video: fbdev: i810: remove incorrect __exit markups Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-03-20 19:50 +0100
      Re: [PATCH] video: fbdev: i810: remove incorrect __exit markups Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> - 2017-03-20 20:00 +0100

#1604825 — Re: [PATCH] video: fbdev: i810: remove incorrect __exit markups

FromBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Date2017-03-20 18:20 +0100
SubjectRe: [PATCH] video: fbdev: i810: remove incorrect __exit markups
Message-ID<tn98m-7Ut-19@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1605062

FromDmitry Torokhov <dmitry.torokhov@gmail.com>
Date2017-03-20 19:50 +0100
Message-ID<tnaxr-nq-7@gated-at.bofh.it>
In reply to#1604825
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

[toc] | [prev] | [next] | [standalone]


#1605081

FromBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Date2017-03-20 20:00 +0100
Message-ID<tnaH8-qZ-31@gated-at.bofh.it>
In reply to#1605062
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web