mbox series

[v1,0/3] Support building gpio-tegra driver as loadable module

Message ID 20210122185543.16554-1-digetx@gmail.com
Headers show
Series Support building gpio-tegra driver as loadable module | expand

Message

Dmitry Osipenko Jan. 22, 2021, 6:55 p.m. UTC
Hi,

This small series adds modularization support to the gpio-tegra driver,
i.e. driver now could be built as a loadable kernel module.

Dmitry Osipenko (3):
  gpio: tegra: Use debugfs_create_devm_seqfile()
  gpio: tegra: Clean up whitespaces in tegra_gpio_driver
  gpio: tegra: Support building driver as a loadable module

 drivers/gpio/Kconfig      |  2 +-
 drivers/gpio/gpio-tegra.c | 31 ++++++++++++++++---------------
 2 files changed, 17 insertions(+), 16 deletions(-)

Comments

Linus Walleij Jan. 23, 2021, 10:50 p.m. UTC | #1
On Fri, Jan 22, 2021 at 7:59 PM Dmitry Osipenko <digetx@gmail.com> wrote:

> This small series adds modularization support to the gpio-tegra driver,

> i.e. driver now could be built as a loadable kernel module.

>

> Dmitry Osipenko (3):

>   gpio: tegra: Use debugfs_create_devm_seqfile()

>   gpio: tegra: Clean up whitespaces in tegra_gpio_driver

>   gpio: tegra: Support building driver as a loadable module


As these three patches clearly make the kernel look better after
than before:
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>


However when we are doing this I would strongly encourage you
to also make a patch implementing remove() so you can insmod
rmmod the module at runtime.

Yours,
Linus Walleij
Dmitry Osipenko Jan. 23, 2021, 11:56 p.m. UTC | #2
24.01.2021 01:50, Linus Walleij пишет:
> On Fri, Jan 22, 2021 at 7:59 PM Dmitry Osipenko <digetx@gmail.com> wrote:

> 

>> This small series adds modularization support to the gpio-tegra driver,

>> i.e. driver now could be built as a loadable kernel module.

>>

>> Dmitry Osipenko (3):

>>   gpio: tegra: Use debugfs_create_devm_seqfile()

>>   gpio: tegra: Clean up whitespaces in tegra_gpio_driver

>>   gpio: tegra: Support building driver as a loadable module

> 

> As these three patches clearly make the kernel look better after

> than before:

> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

> 

> However when we are doing this I would strongly encourage you

> to also make a patch implementing remove() so you can insmod

> rmmod the module at runtime.


The remove() is optional for drivers, it doesn't prevent the rmmod.
Linus Walleij Jan. 24, 2021, 10:46 p.m. UTC | #3
On Sun, Jan 24, 2021 at 12:56 AM Dmitry Osipenko <digetx@gmail.com> wrote:
> 24.01.2021 01:50, Linus Walleij пишет:

> > On Fri, Jan 22, 2021 at 7:59 PM Dmitry Osipenko <digetx@gmail.com> wrote:

> >

> >> This small series adds modularization support to the gpio-tegra driver,

> >> i.e. driver now could be built as a loadable kernel module.

> >>

> >> Dmitry Osipenko (3):

> >>   gpio: tegra: Use debugfs_create_devm_seqfile()

> >>   gpio: tegra: Clean up whitespaces in tegra_gpio_driver

> >>   gpio: tegra: Support building driver as a loadable module

> >

> > As these three patches clearly make the kernel look better after

> > than before:

> > Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

> >

> > However when we are doing this I would strongly encourage you

> > to also make a patch implementing remove() so you can insmod

> > rmmod the module at runtime.

>

> The remove() is optional for drivers, it doesn't prevent the rmmod.


Aha you mean all resources are managed (devm_*) so that
rmmod/insmod works fine with this driver?

OK then! :) the work is finished.

Yours,
Linus Walleij
Dmitry Osipenko Jan. 25, 2021, 2:08 p.m. UTC | #4
25.01.2021 01:46, Linus Walleij пишет:
> On Sun, Jan 24, 2021 at 12:56 AM Dmitry Osipenko <digetx@gmail.com> wrote:

>> 24.01.2021 01:50, Linus Walleij пишет:

>>> On Fri, Jan 22, 2021 at 7:59 PM Dmitry Osipenko <digetx@gmail.com> wrote:

>>>

>>>> This small series adds modularization support to the gpio-tegra driver,

>>>> i.e. driver now could be built as a loadable kernel module.

>>>>

>>>> Dmitry Osipenko (3):

>>>>   gpio: tegra: Use debugfs_create_devm_seqfile()

>>>>   gpio: tegra: Clean up whitespaces in tegra_gpio_driver

>>>>   gpio: tegra: Support building driver as a loadable module

>>>

>>> As these three patches clearly make the kernel look better after

>>> than before:

>>> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

>>>

>>> However when we are doing this I would strongly encourage you

>>> to also make a patch implementing remove() so you can insmod

>>> rmmod the module at runtime.

>>

>> The remove() is optional for drivers, it doesn't prevent the rmmod.

> 

> Aha you mean all resources are managed (devm_*) so that

> rmmod/insmod works fine with this driver?


yes

> OK then! :) the work is finished.


The work on the modularization indeed should be finished, thanks.
Bartosz Golaszewski Jan. 27, 2021, 2:41 p.m. UTC | #5
On Fri, Jan 22, 2021 at 7:59 PM Dmitry Osipenko <digetx@gmail.com> wrote:
>

> Hi,

>

> This small series adds modularization support to the gpio-tegra driver,

> i.e. driver now could be built as a loadable kernel module.

>

> Dmitry Osipenko (3):

>   gpio: tegra: Use debugfs_create_devm_seqfile()

>   gpio: tegra: Clean up whitespaces in tegra_gpio_driver

>   gpio: tegra: Support building driver as a loadable module

>

>  drivers/gpio/Kconfig      |  2 +-

>  drivers/gpio/gpio-tegra.c | 31 ++++++++++++++++---------------

>  2 files changed, 17 insertions(+), 16 deletions(-)

>

> --

> 2.29.2

>


Series applied, thanks!

Bartosz