diff mbox series

staging: greybus: Drop assignment to struct pwm_chip::base

Message ID 20220411083118.200663-1-u.kleine-koenig@pengutronix.de
State Changes Requested
Headers show
Series staging: greybus: Drop assignment to struct pwm_chip::base | expand

Commit Message

Uwe Kleine-König April 11, 2022, 8:31 a.m. UTC
Since commit f9a8ee8c8bcd ("pwm: Always allocate PWM chip base ID
dynamically") the value held in base isn't used any more in the PWM
framework. All PMWs get assigned a dynamic ID, so the assignment is
redundant and can be dropped.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/staging/greybus/pwm.c | 1 -
 1 file changed, 1 deletion(-)


base-commit: 3123109284176b1532874591f7c81f3837bbdc17

Comments

Johan Hovold April 11, 2022, 9:13 a.m. UTC | #1
On Mon, Apr 11, 2022 at 10:31:18AM +0200, Uwe Kleine-König wrote:
> Since commit f9a8ee8c8bcd ("pwm: Always allocate PWM chip base ID
> dynamically") the value held in base isn't used any more in the PWM
> framework. All PMWs get assigned a dynamic ID, so the assignment is
> redundant and can be dropped.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  drivers/staging/greybus/pwm.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/staging/greybus/pwm.c b/drivers/staging/greybus/pwm.c
> index ad20ec24031e..3fda172239d2 100644
> --- a/drivers/staging/greybus/pwm.c
> +++ b/drivers/staging/greybus/pwm.c
> @@ -297,7 +297,6 @@ static int gb_pwm_probe(struct gbphy_device *gbphy_dev,
>  
>  	pwm->dev = &gbphy_dev->dev;
>  	pwm->ops = &gb_pwm_ops;
> -	pwm->base = -1;			/* Allocate base dynamically */
>  	pwm->npwm = pwmc->pwm_max + 1;
>  
>  	ret = pwmchip_add(pwm);
> 
> base-commit: 3123109284176b1532874591f7c81f3837bbdc17

I'd prefer if you added a "pwm: " module prefix to the summary (even if
the previous patch to this driver didn't have that).

Looks good to me otherwise:

Reviewed-by: Johan Hovold <johan@kernel.org>

Johan
Uwe Kleine-König April 11, 2022, 9:48 a.m. UTC | #2
On Mon, Apr 11, 2022 at 11:13:05AM +0200, Johan Hovold wrote:
> On Mon, Apr 11, 2022 at 10:31:18AM +0200, Uwe Kleine-König wrote:
> > Since commit f9a8ee8c8bcd ("pwm: Always allocate PWM chip base ID
> > dynamically") the value held in base isn't used any more in the PWM
> > framework. All PMWs get assigned a dynamic ID, so the assignment is
> > redundant and can be dropped.
> > 
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > ---
> >  drivers/staging/greybus/pwm.c | 1 -
> >  1 file changed, 1 deletion(-)
> > 
> > diff --git a/drivers/staging/greybus/pwm.c b/drivers/staging/greybus/pwm.c
> > index ad20ec24031e..3fda172239d2 100644
> > --- a/drivers/staging/greybus/pwm.c
> > +++ b/drivers/staging/greybus/pwm.c
> > @@ -297,7 +297,6 @@ static int gb_pwm_probe(struct gbphy_device *gbphy_dev,
> >  
> >  	pwm->dev = &gbphy_dev->dev;
> >  	pwm->ops = &gb_pwm_ops;
> > -	pwm->base = -1;			/* Allocate base dynamically */
> >  	pwm->npwm = pwmc->pwm_max + 1;
> >  
> >  	ret = pwmchip_add(pwm);
> > 
> > base-commit: 3123109284176b1532874591f7c81f3837bbdc17
> 
> I'd prefer if you added a "pwm: " module prefix to the summary (even if
> the previous patch to this driver didn't have that).
> 
> Looks good to me otherwise:
> 
> Reviewed-by: Johan Hovold <johan@kernel.org>

Am I supposed to resend with the changed subject? Who will pick this up?

Best regards
Uwe
Johan Hovold April 11, 2022, 9:49 a.m. UTC | #3
On Mon, Apr 11, 2022 at 11:48:28AM +0200, Uwe Kleine-König wrote:
> On Mon, Apr 11, 2022 at 11:13:05AM +0200, Johan Hovold wrote:
> > On Mon, Apr 11, 2022 at 10:31:18AM +0200, Uwe Kleine-König wrote:
> > > Since commit f9a8ee8c8bcd ("pwm: Always allocate PWM chip base ID
> > > dynamically") the value held in base isn't used any more in the PWM
> > > framework. All PMWs get assigned a dynamic ID, so the assignment is
> > > redundant and can be dropped.
> > > 
> > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> > > ---
> > >  drivers/staging/greybus/pwm.c | 1 -
> > >  1 file changed, 1 deletion(-)
> > > 
> > > diff --git a/drivers/staging/greybus/pwm.c b/drivers/staging/greybus/pwm.c
> > > index ad20ec24031e..3fda172239d2 100644
> > > --- a/drivers/staging/greybus/pwm.c
> > > +++ b/drivers/staging/greybus/pwm.c
> > > @@ -297,7 +297,6 @@ static int gb_pwm_probe(struct gbphy_device *gbphy_dev,
> > >  
> > >  	pwm->dev = &gbphy_dev->dev;
> > >  	pwm->ops = &gb_pwm_ops;
> > > -	pwm->base = -1;			/* Allocate base dynamically */
> > >  	pwm->npwm = pwmc->pwm_max + 1;
> > >  
> > >  	ret = pwmchip_add(pwm);
> > > 
> > > base-commit: 3123109284176b1532874591f7c81f3837bbdc17
> > 
> > I'd prefer if you added a "pwm: " module prefix to the summary (even if
> > the previous patch to this driver didn't have that).
> > 
> > Looks good to me otherwise:
> > 
> > Reviewed-by: Johan Hovold <johan@kernel.org>
> 
> Am I supposed to resend with the changed subject? Who will pick this up?

Please do. Greg will pick it up. Thanks.

Johan
diff mbox series

Patch

diff --git a/drivers/staging/greybus/pwm.c b/drivers/staging/greybus/pwm.c
index ad20ec24031e..3fda172239d2 100644
--- a/drivers/staging/greybus/pwm.c
+++ b/drivers/staging/greybus/pwm.c
@@ -297,7 +297,6 @@  static int gb_pwm_probe(struct gbphy_device *gbphy_dev,
 
 	pwm->dev = &gbphy_dev->dev;
 	pwm->ops = &gb_pwm_ops;
-	pwm->base = -1;			/* Allocate base dynamically */
 	pwm->npwm = pwmc->pwm_max + 1;
 
 	ret = pwmchip_add(pwm);