All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: William Breathitt Gray <vilhelm.gray@gmail.com>
Cc: Colin King <colin.king@canonical.com>,
	Fabrice Gasnier <fabrice.gasnier@st.com>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@st.com>,
	linux-iio@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] counter: stm32: clean up indentation issue
Date: Sun, 6 Oct 2019 09:46:15 +0100	[thread overview]
Message-ID: <20191006094615.5b798a42@archlinux> (raw)
In-Reply-To: <20191005173004.GA7431@icarus>

On Sat, 5 Oct 2019 13:30:04 -0400
William Breathitt Gray <vilhelm.gray@gmail.com> wrote:

> On Wed, Sep 25, 2019 at 10:51:26AM +0100, Colin King wrote:
> > From: Colin Ian King <colin.king@canonical.com>
> > 
> > There is an if statement that is indented one level too deeply,
> > remove the extraneous tabs.
> > 
> > Signed-off-by: Colin Ian King <colin.king@canonical.com>
> > ---
> >  drivers/counter/stm32-timer-cnt.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/counter/stm32-timer-cnt.c b/drivers/counter/stm32-timer-cnt.c
> > index 644ba18a72ad..613dcccf79e1 100644
> > --- a/drivers/counter/stm32-timer-cnt.c
> > +++ b/drivers/counter/stm32-timer-cnt.c
> > @@ -219,8 +219,8 @@ static ssize_t stm32_count_enable_write(struct counter_device *counter,
> >  
> >  	if (enable) {
> >  		regmap_read(priv->regmap, TIM_CR1, &cr1);
> > -			if (!(cr1 & TIM_CR1_CEN))
> > -				clk_enable(priv->clk);
> > +		if (!(cr1 & TIM_CR1_CEN))
> > +			clk_enable(priv->clk);
> >  
> >  		regmap_update_bits(priv->regmap, TIM_CR1, TIM_CR1_CEN,
> >  				   TIM_CR1_CEN);
> > -- 
> > 2.20.1  
> 
> Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to poke it.

Thanks,

Jonathan

> 
> Fabrice,
> 
> I noticed the TIM_CR1_CEN check is happening before the
> regmap_update_bits call for the enable path, while the disable path does
> the check after. Is this logic is correct.
> 
> William Breathitt Gray


WARNING: multiple messages have this Message-ID (diff)
From: Jonathan Cameron <jic23@kernel.org>
To: William Breathitt Gray <vilhelm.gray@gmail.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>,
	linux-iio@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Colin King <colin.king@canonical.com>,
	Fabrice Gasnier <fabrice.gasnier@st.com>,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] counter: stm32: clean up indentation issue
Date: Sun, 06 Oct 2019 08:46:15 +0000	[thread overview]
Message-ID: <20191006094615.5b798a42@archlinux> (raw)
In-Reply-To: <20191005173004.GA7431@icarus>

On Sat, 5 Oct 2019 13:30:04 -0400
William Breathitt Gray <vilhelm.gray@gmail.com> wrote:

> On Wed, Sep 25, 2019 at 10:51:26AM +0100, Colin King wrote:
> > From: Colin Ian King <colin.king@canonical.com>
> > 
> > There is an if statement that is indented one level too deeply,
> > remove the extraneous tabs.
> > 
> > Signed-off-by: Colin Ian King <colin.king@canonical.com>
> > ---
> >  drivers/counter/stm32-timer-cnt.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/counter/stm32-timer-cnt.c b/drivers/counter/stm32-timer-cnt.c
> > index 644ba18a72ad..613dcccf79e1 100644
> > --- a/drivers/counter/stm32-timer-cnt.c
> > +++ b/drivers/counter/stm32-timer-cnt.c
> > @@ -219,8 +219,8 @@ static ssize_t stm32_count_enable_write(struct counter_device *counter,
> >  
> >  	if (enable) {
> >  		regmap_read(priv->regmap, TIM_CR1, &cr1);
> > -			if (!(cr1 & TIM_CR1_CEN))
> > -				clk_enable(priv->clk);
> > +		if (!(cr1 & TIM_CR1_CEN))
> > +			clk_enable(priv->clk);
> >  
> >  		regmap_update_bits(priv->regmap, TIM_CR1, TIM_CR1_CEN,
> >  				   TIM_CR1_CEN);
> > -- 
> > 2.20.1  
> 
> Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to poke it.

Thanks,

Jonathan

> 
> Fabrice,
> 
> I noticed the TIM_CR1_CEN check is happening before the
> regmap_update_bits call for the enable path, while the disable path does
> the check after. Is this logic is correct.
> 
> William Breathitt Gray

WARNING: multiple messages have this Message-ID (diff)
From: Jonathan Cameron <jic23@kernel.org>
To: William Breathitt Gray <vilhelm.gray@gmail.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>,
	linux-iio@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Colin King <colin.king@canonical.com>,
	Fabrice Gasnier <fabrice.gasnier@st.com>,
	linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] counter: stm32: clean up indentation issue
Date: Sun, 6 Oct 2019 09:46:15 +0100	[thread overview]
Message-ID: <20191006094615.5b798a42@archlinux> (raw)
In-Reply-To: <20191005173004.GA7431@icarus>

On Sat, 5 Oct 2019 13:30:04 -0400
William Breathitt Gray <vilhelm.gray@gmail.com> wrote:

> On Wed, Sep 25, 2019 at 10:51:26AM +0100, Colin King wrote:
> > From: Colin Ian King <colin.king@canonical.com>
> > 
> > There is an if statement that is indented one level too deeply,
> > remove the extraneous tabs.
> > 
> > Signed-off-by: Colin Ian King <colin.king@canonical.com>
> > ---
> >  drivers/counter/stm32-timer-cnt.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/counter/stm32-timer-cnt.c b/drivers/counter/stm32-timer-cnt.c
> > index 644ba18a72ad..613dcccf79e1 100644
> > --- a/drivers/counter/stm32-timer-cnt.c
> > +++ b/drivers/counter/stm32-timer-cnt.c
> > @@ -219,8 +219,8 @@ static ssize_t stm32_count_enable_write(struct counter_device *counter,
> >  
> >  	if (enable) {
> >  		regmap_read(priv->regmap, TIM_CR1, &cr1);
> > -			if (!(cr1 & TIM_CR1_CEN))
> > -				clk_enable(priv->clk);
> > +		if (!(cr1 & TIM_CR1_CEN))
> > +			clk_enable(priv->clk);
> >  
> >  		regmap_update_bits(priv->regmap, TIM_CR1, TIM_CR1_CEN,
> >  				   TIM_CR1_CEN);
> > -- 
> > 2.20.1  
> 
> Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to poke it.

Thanks,

Jonathan

> 
> Fabrice,
> 
> I noticed the TIM_CR1_CEN check is happening before the
> regmap_update_bits call for the enable path, while the disable path does
> the check after. Is this logic is correct.
> 
> William Breathitt Gray


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-10-06  8:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-25  9:51 [PATCH] counter: stm32: clean up indentation issue Colin King
2019-09-25  9:51 ` Colin King
2019-09-25  9:51 ` Colin King
2019-10-05 17:30 ` William Breathitt Gray
2019-10-05 17:30   ` William Breathitt Gray
2019-10-05 17:30   ` William Breathitt Gray
2019-10-06  8:46   ` Jonathan Cameron [this message]
2019-10-06  8:46     ` Jonathan Cameron
2019-10-06  8:46     ` Jonathan Cameron
2019-10-07  7:31   ` Fabrice Gasnier
2019-10-07  7:31     ` Fabrice Gasnier
2019-10-07  7:31     ` Fabrice Gasnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191006094615.5b798a42@archlinux \
    --to=jic23@kernel.org \
    --cc=alexandre.torgue@st.com \
    --cc=colin.king@canonical.com \
    --cc=fabrice.gasnier@st.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=vilhelm.gray@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.