Message ID | 20240606164047.534741-6-u.kleine-koenig@baylibre.com |
---|---|
State | Accepted |
Headers | show |
Series | pwm: Make use of regmap_{set,clear}_bits() | expand |
On 2024-06-06 12:40 p.m., Uwe Kleine-König wrote: > Instead of using regmap_update_bits() and passing val=0, better use > regmap_clear_bits(). > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Acked-by: Trevor Gamblin <tgamblin@baylibre.com> > --- > drivers/pwm/pwm-axi-pwmgen.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/pwm/pwm-axi-pwmgen.c b/drivers/pwm/pwm-axi-pwmgen.c > index 1bd4150e0158..aac4f395497b 100644 > --- a/drivers/pwm/pwm-axi-pwmgen.c > +++ b/drivers/pwm/pwm-axi-pwmgen.c > @@ -156,7 +156,7 @@ static int axi_pwmgen_setup(struct regmap *regmap, struct device *dev) > } > > /* Enable the core */ > - ret = regmap_update_bits(regmap, AXI_PWMGEN_REG_CONFIG, AXI_PWMGEN_REG_CONFIG_RESET, 0); > + ret = regmap_clear_bits(regmap, AXI_PWMGEN_REG_CONFIG, AXI_PWMGEN_REG_CONFIG_RESET); > if (ret) > return ret; >
On Thu, 2024-06-06 at 18:40 +0200, Uwe Kleine-König wrote: > Instead of using regmap_update_bits() and passing val=0, better use > regmap_clear_bits(). > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> > --- Reviewed-by: Nuno Sa <nuno.sa@analog.com> > drivers/pwm/pwm-axi-pwmgen.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/pwm/pwm-axi-pwmgen.c b/drivers/pwm/pwm-axi-pwmgen.c > index 1bd4150e0158..aac4f395497b 100644 > --- a/drivers/pwm/pwm-axi-pwmgen.c > +++ b/drivers/pwm/pwm-axi-pwmgen.c > @@ -156,7 +156,7 @@ static int axi_pwmgen_setup(struct regmap *regmap, struct > device *dev) > } > > /* Enable the core */ > - ret = regmap_update_bits(regmap, AXI_PWMGEN_REG_CONFIG, > AXI_PWMGEN_REG_CONFIG_RESET, 0); > + ret = regmap_clear_bits(regmap, AXI_PWMGEN_REG_CONFIG, > AXI_PWMGEN_REG_CONFIG_RESET); > if (ret) > return ret; >
Hello Nuno, On Fri, Jun 07, 2024 at 08:40:32AM +0200, Nuno Sá wrote: > On Thu, 2024-06-06 at 18:40 +0200, Uwe Kleine-König wrote: > > Instead of using regmap_update_bits() and passing val=0, better use > > regmap_clear_bits(). > > > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> > > --- > > Reviewed-by: Nuno Sa <nuno.sa@analog.com> Thanks for looking at the patch. When I apply it (using b4) I get however: NOTE: some trailers ignored due to from/email mismatches: ! Trailer: Reviewed-by: Nuno Sa <nuno.sa@analog.com> Msg From: Nuno Sá <noname.nuno@gmail.com> I'll add it anyhow, but it would be great if you fixed your workflow to have the sender match the address in the tag. Best regards Uwe
On Mon, Jun 10, 2024 at 07:53:33AM +0200, Uwe Kleine-König wrote: > Hello Nuno, > > On Fri, Jun 07, 2024 at 08:40:32AM +0200, Nuno Sá wrote: > > On Thu, 2024-06-06 at 18:40 +0200, Uwe Kleine-König wrote: > > > Instead of using regmap_update_bits() and passing val=0, better use > > > regmap_clear_bits(). > > > > > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> > > > --- > > > > Reviewed-by: Nuno Sa <nuno.sa@analog.com> > > Thanks for looking at the patch. When I apply it (using b4) I get > however: > > NOTE: some trailers ignored due to from/email mismatches: > ! Trailer: Reviewed-by: Nuno Sa <nuno.sa@analog.com> > Msg From: Nuno Sá <noname.nuno@gmail.com> > > I'll add it anyhow, but it would be great if you fixed your workflow to > have the sender match the address in the tag. I'm curious, given I do this all the time, do you not see similar issues for me?
On Mon, 2024-06-10 at 07:53 +0200, Uwe Kleine-König wrote: > Hello Nuno, > > On Fri, Jun 07, 2024 at 08:40:32AM +0200, Nuno Sá wrote: > > On Thu, 2024-06-06 at 18:40 +0200, Uwe Kleine-König wrote: > > > Instead of using regmap_update_bits() and passing val=0, better use > > > regmap_clear_bits(). > > > > > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> > > > --- > > > > Reviewed-by: Nuno Sa <nuno.sa@analog.com> > > Thanks for looking at the patch. When I apply it (using b4) I get > however: > > NOTE: some trailers ignored due to from/email mismatches: > ! Trailer: Reviewed-by: Nuno Sa <nuno.sa@analog.com> > Msg From: Nuno Sá <noname.nuno@gmail.com> > > I'll add it anyhow, but it would be great if you fixed your workflow to > have the sender match the address in the tag. > Yeah, I'm aware of it. Sending emails from my corporate email is just too painful that I use my personal one and an email client that actually fits kernel development. Til now, it was never an issue and this is the first "complain" I'm getting :). I'll try to remember this for pwm in the future... Sorry for the trouble! - Nuno Sá
On Mon, Jun 10, 2024 at 09:00:53AM +0100, Conor Dooley wrote: > On Mon, Jun 10, 2024 at 07:53:33AM +0200, Uwe Kleine-König wrote: > > Hello Nuno, > > > > On Fri, Jun 07, 2024 at 08:40:32AM +0200, Nuno Sá wrote: > > > On Thu, 2024-06-06 at 18:40 +0200, Uwe Kleine-König wrote: > > > > Instead of using regmap_update_bits() and passing val=0, better use > > > > regmap_clear_bits(). > > > > > > > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> > > > > --- > > > > > > Reviewed-by: Nuno Sa <nuno.sa@analog.com> > > > > Thanks for looking at the patch. When I apply it (using b4) I get > > however: > > > > NOTE: some trailers ignored due to from/email mismatches: > > ! Trailer: Reviewed-by: Nuno Sa <nuno.sa@analog.com> > > Msg From: Nuno Sá <noname.nuno@gmail.com> > > > > I'll add it anyhow, but it would be great if you fixed your workflow to > > have the sender match the address in the tag. > > I'm curious, given I do this all the time, do you not see similar issues > for me? Never noticed that for you. Maybe that's a new check in b4? I recently reinstalled my devel machine, so I likely have a new version even if the upstream change is a bit older already. Best regards Uwe
On Mon, Jun 10, 2024 at 10:32:13AM +0200, Uwe Kleine-König wrote: > On Mon, Jun 10, 2024 at 09:00:53AM +0100, Conor Dooley wrote: > > On Mon, Jun 10, 2024 at 07:53:33AM +0200, Uwe Kleine-König wrote: > > > Hello Nuno, > > > > > > On Fri, Jun 07, 2024 at 08:40:32AM +0200, Nuno Sá wrote: > > > > On Thu, 2024-06-06 at 18:40 +0200, Uwe Kleine-König wrote: > > > > > Instead of using regmap_update_bits() and passing val=0, better use > > > > > regmap_clear_bits(). > > > > > > > > > > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> > > > > > --- > > > > > > > > Reviewed-by: Nuno Sa <nuno.sa@analog.com> > > > > > > Thanks for looking at the patch. When I apply it (using b4) I get > > > however: > > > > > > NOTE: some trailers ignored due to from/email mismatches: > > > ! Trailer: Reviewed-by: Nuno Sa <nuno.sa@analog.com> > > > Msg From: Nuno Sá <noname.nuno@gmail.com> > > > > > > I'll add it anyhow, but it would be great if you fixed your workflow to > > > have the sender match the address in the tag. > > > > I'm curious, given I do this all the time, do you not see similar issues > > for me? > > Never noticed that for you. Maybe that's a new check in b4? I recently > reinstalled my devel machine, so I likely have a new version even if the > upstream change is a bit older already. Nah, I think that's been in b4 for as long as I have been using it, even when I used the old version from debian. Maybe my use of patatt is the reason or some exemption for kernel.org addresses.
diff --git a/drivers/pwm/pwm-axi-pwmgen.c b/drivers/pwm/pwm-axi-pwmgen.c index 1bd4150e0158..aac4f395497b 100644 --- a/drivers/pwm/pwm-axi-pwmgen.c +++ b/drivers/pwm/pwm-axi-pwmgen.c @@ -156,7 +156,7 @@ static int axi_pwmgen_setup(struct regmap *regmap, struct device *dev) } /* Enable the core */ - ret = regmap_update_bits(regmap, AXI_PWMGEN_REG_CONFIG, AXI_PWMGEN_REG_CONFIG_RESET, 0); + ret = regmap_clear_bits(regmap, AXI_PWMGEN_REG_CONFIG, AXI_PWMGEN_REG_CONFIG_RESET); if (ret) return ret;
Instead of using regmap_update_bits() and passing val=0, better use regmap_clear_bits(). Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> --- drivers/pwm/pwm-axi-pwmgen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)