[RESEND PATCH] mux: constify mux class

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

All class functions used here take a const pointer to the class
structure so we can make the struct itself constant.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
Greg: Peter picked this up into his branch long before the v6.13 merge
window, then never sent it upstream. Could you pick this up this time
into your tree?

 drivers/mux/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mux/core.c b/drivers/mux/core.c
index 78c0022697ec7..02be4ba372571 100644
--- a/drivers/mux/core.c
+++ b/drivers/mux/core.c
@@ -42,7 +42,7 @@ struct mux_state {
 	unsigned int state;
 };
 
-static struct class mux_class = {
+static const struct class mux_class = {
 	.name = "mux",
 };
 
-- 
2.45.2
Re: [RESEND PATCH] mux: constify mux class
Posted by Greg Kroah-Hartman 1 year ago
On Thu, Dec 05, 2024 at 09:56:05AM +0100, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> 
> All class functions used here take a const pointer to the class
> structure so we can make the struct itself constant.
> 
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> ---
> Greg: Peter picked this up into his branch long before the v6.13 merge
> window, then never sent it upstream. Could you pick this up this time
> into your tree?
> 
>  drivers/mux/core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/mux/core.c b/drivers/mux/core.c
> index 78c0022697ec7..02be4ba372571 100644
> --- a/drivers/mux/core.c
> +++ b/drivers/mux/core.c
> @@ -42,7 +42,7 @@ struct mux_state {
>  	unsigned int state;
>  };
>  
> -static struct class mux_class = {
> +static const struct class mux_class = {
>  	.name = "mux",
>  };
>  
> -- 
> 2.45.2
> 

Sure, will do, thanks.  I should sweep the tree for the remaining ones
as well...

thanks,

greg k-h
Re: [RESEND PATCH] mux: constify mux class
Posted by Bartosz Golaszewski 11 months, 2 weeks ago
On Thu, Dec 5, 2024 at 10:12 AM Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
>
> On Thu, Dec 05, 2024 at 09:56:05AM +0100, Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> >
> > All class functions used here take a const pointer to the class
> > structure so we can make the struct itself constant.
> >
> > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> > ---
> > Greg: Peter picked this up into his branch long before the v6.13 merge
> > window, then never sent it upstream. Could you pick this up this time
> > into your tree?
> >
> >  drivers/mux/core.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/mux/core.c b/drivers/mux/core.c
> > index 78c0022697ec7..02be4ba372571 100644
> > --- a/drivers/mux/core.c
> > +++ b/drivers/mux/core.c
> > @@ -42,7 +42,7 @@ struct mux_state {
> >       unsigned int state;
> >  };
> >
> > -static struct class mux_class = {
> > +static const struct class mux_class = {
> >       .name = "mux",
> >  };
> >
> > --
> > 2.45.2
> >
>
> Sure, will do, thanks.  I should sweep the tree for the remaining ones
> as well...
>
> thanks,
>
> greg k-h

Hi! Gentle ping because I'm not sure if this got lost or you're still
getting to it in your queue.

Bart
Re: [RESEND PATCH] mux: constify mux class
Posted by Greg Kroah-Hartman 11 months, 1 week ago
On Thu, Jan 02, 2025 at 10:21:51AM +0100, Bartosz Golaszewski wrote:
> On Thu, Dec 5, 2024 at 10:12 AM Greg Kroah-Hartman
> <gregkh@linuxfoundation.org> wrote:
> >
> > On Thu, Dec 05, 2024 at 09:56:05AM +0100, Bartosz Golaszewski wrote:
> > > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> > >
> > > All class functions used here take a const pointer to the class
> > > structure so we can make the struct itself constant.
> > >
> > > Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> > > ---
> > > Greg: Peter picked this up into his branch long before the v6.13 merge
> > > window, then never sent it upstream. Could you pick this up this time
> > > into your tree?
> > >
> > >  drivers/mux/core.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/mux/core.c b/drivers/mux/core.c
> > > index 78c0022697ec7..02be4ba372571 100644
> > > --- a/drivers/mux/core.c
> > > +++ b/drivers/mux/core.c
> > > @@ -42,7 +42,7 @@ struct mux_state {
> > >       unsigned int state;
> > >  };
> > >
> > > -static struct class mux_class = {
> > > +static const struct class mux_class = {
> > >       .name = "mux",
> > >  };
> > >
> > > --
> > > 2.45.2
> > >
> >
> > Sure, will do, thanks.  I should sweep the tree for the remaining ones
> > as well...
> >
> > thanks,
> >
> > greg k-h
> 
> Hi! Gentle ping because I'm not sure if this got lost or you're still
> getting to it in your queue.

Sorry for the delay, will get this now.

greg k-h