[PATCH] driver core: constify devlink class

Bartosz Golaszewski posted 1 patch 1 month, 1 week ago
drivers/base/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] driver core: constify devlink class
Posted by Bartosz Golaszewski 1 month, 1 week ago
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

The devlink class object is never modified and can be made constant.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
 drivers/base/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/core.c b/drivers/base/core.c
index a84a7b952cfd..0e618d675792 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -553,7 +553,7 @@ void device_link_wait_removal(void)
 }
 EXPORT_SYMBOL_GPL(device_link_wait_removal);
 
-static struct class devlink_class = {
+static const struct class devlink_class = {
 	.name = "devlink",
 	.dev_groups = devlink_groups,
 	.dev_release = devlink_dev_release,
-- 
2.43.0
Re: [PATCH] driver core: constify devlink class
Posted by Rafael J. Wysocki 1 month ago
On Mon, Oct 14, 2024 at 2:28 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
>
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> The devlink class object is never modified and can be made constant.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

Acked-by: Rafael J. Wysocki <rafael@kernel.org>

> ---
>  drivers/base/core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/base/core.c b/drivers/base/core.c
> index a84a7b952cfd..0e618d675792 100644
> --- a/drivers/base/core.c
> +++ b/drivers/base/core.c
> @@ -553,7 +553,7 @@ void device_link_wait_removal(void)
>  }
>  EXPORT_SYMBOL_GPL(device_link_wait_removal);
>
> -static struct class devlink_class = {
> +static const struct class devlink_class = {
>         .name = "devlink",
>         .dev_groups = devlink_groups,
>         .dev_release = devlink_dev_release,
> --
> 2.43.0
>
Re: [PATCH] driver core: constify devlink class
Posted by Saravana Kannan 1 month ago
On Thu, Oct 24, 2024 at 12:45 PM Rafael J. Wysocki <rafael@kernel.org> wrote:
>
> On Mon, Oct 14, 2024 at 2:28 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
> >
> > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> >
> > The devlink class object is never modified and can be made constant.
> >
> > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> Acked-by: Rafael J. Wysocki <rafael@kernel.org>

Acked-by: Saravana Kannan <saravanak@google.com>

-Saravana

>
> > ---
> >  drivers/base/core.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/base/core.c b/drivers/base/core.c
> > index a84a7b952cfd..0e618d675792 100644
> > --- a/drivers/base/core.c
> > +++ b/drivers/base/core.c
> > @@ -553,7 +553,7 @@ void device_link_wait_removal(void)
> >  }
> >  EXPORT_SYMBOL_GPL(device_link_wait_removal);
> >
> > -static struct class devlink_class = {
> > +static const struct class devlink_class = {
> >         .name = "devlink",
> >         .dev_groups = devlink_groups,
> >         .dev_release = devlink_dev_release,
> > --
> > 2.43.0
> >
Re: [PATCH] driver core: constify devlink class
Posted by Bartosz Golaszewski 3 weeks, 5 days ago
On Thu, Oct 24, 2024 at 9:54 PM Saravana Kannan <saravanak@google.com> wrote:
>
> On Thu, Oct 24, 2024 at 12:45 PM Rafael J. Wysocki <rafael@kernel.org> wrote:
> >
> > On Mon, Oct 14, 2024 at 2:28 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
> > >
> > > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> > >
> > > The devlink class object is never modified and can be made constant.
> > >
> > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> >
> > Acked-by: Rafael J. Wysocki <rafael@kernel.org>
>
> Acked-by: Saravana Kannan <saravanak@google.com>
>
> -Saravana
>
> >
> > > ---
> > >  drivers/base/core.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/base/core.c b/drivers/base/core.c
> > > index a84a7b952cfd..0e618d675792 100644
> > > --- a/drivers/base/core.c
> > > +++ b/drivers/base/core.c
> > > @@ -553,7 +553,7 @@ void device_link_wait_removal(void)
> > >  }
> > >  EXPORT_SYMBOL_GPL(device_link_wait_removal);
> > >
> > > -static struct class devlink_class = {
> > > +static const struct class devlink_class = {
> > >         .name = "devlink",
> > >         .dev_groups = devlink_groups,
> > >         .dev_release = devlink_dev_release,
> > > --
> > > 2.43.0
> > >

Greg, can you pick this one up please?

Bart
Re: [PATCH] driver core: constify devlink class
Posted by Greg Kroah-Hartman 3 weeks, 4 days ago
On Thu, Oct 31, 2024 at 01:31:43PM +0100, Bartosz Golaszewski wrote:
> On Thu, Oct 24, 2024 at 9:54 PM Saravana Kannan <saravanak@google.com> wrote:
> >
> > On Thu, Oct 24, 2024 at 12:45 PM Rafael J. Wysocki <rafael@kernel.org> wrote:
> > >
> > > On Mon, Oct 14, 2024 at 2:28 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
> > > >
> > > > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> > > >
> > > > The devlink class object is never modified and can be made constant.
> > > >
> > > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> > >
> > > Acked-by: Rafael J. Wysocki <rafael@kernel.org>
> >
> > Acked-by: Saravana Kannan <saravanak@google.com>
> >
> > -Saravana
> >
> > >
> > > > ---
> > > >  drivers/base/core.c | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/drivers/base/core.c b/drivers/base/core.c
> > > > index a84a7b952cfd..0e618d675792 100644
> > > > --- a/drivers/base/core.c
> > > > +++ b/drivers/base/core.c
> > > > @@ -553,7 +553,7 @@ void device_link_wait_removal(void)
> > > >  }
> > > >  EXPORT_SYMBOL_GPL(device_link_wait_removal);
> > > >
> > > > -static struct class devlink_class = {
> > > > +static const struct class devlink_class = {
> > > >         .name = "devlink",
> > > >         .dev_groups = devlink_groups,
> > > >         .dev_release = devlink_dev_release,
> > > > --
> > > > 2.43.0
> > > >
> 
> Greg, can you pick this one up please?

I will, give me time for trivial stuff like this please, lots of travel
and "other" things happening right now (i.e. my INBOX is trashed.)

Will be able to hopefully catch up by the end of next week if all goes
well...

thanks,

greg k-h
Re: [PATCH] driver core: constify devlink class
Posted by Bartosz Golaszewski 1 month ago
On Mon, Oct 14, 2024 at 2:28 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote:
>
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> The devlink class object is never modified and can be made constant.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> ---
>  drivers/base/core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/base/core.c b/drivers/base/core.c
> index a84a7b952cfd..0e618d675792 100644
> --- a/drivers/base/core.c
> +++ b/drivers/base/core.c
> @@ -553,7 +553,7 @@ void device_link_wait_removal(void)
>  }
>  EXPORT_SYMBOL_GPL(device_link_wait_removal);
>
> -static struct class devlink_class = {
> +static const struct class devlink_class = {
>         .name = "devlink",
>         .dev_groups = devlink_groups,
>         .dev_release = devlink_dev_release,
> --
> 2.43.0
>

Gentle ping.

Bart