mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel@pengutronix.de>
To: Jiancheng Xue <xuejiancheng@hisilicon.com>
Cc: linux-kernel@vger.kernel.org, afd@ti.com, s-anna@ti.com,
	yanhaifeng@hisilicon.com, zhangfei.gao@gmail.com
Subject: Re: [PATCH v2] reset: ti_syscon: fix a ti_syscon_reset_status issue
Date: Wed, 30 Nov 2016 11:07:05 +0100	[thread overview]
Message-ID: <1480500425.2527.30.camel@pengutronix.de> (raw)
In-Reply-To: <1480467812-32507-1-git-send-email-xuejiancheng@hisilicon.com>

Hi Jiancheng,

Am Mittwoch, den 30.11.2016, 09:03 +0800 schrieb Jiancheng Xue:
> If STATUS_SET was not set, ti_syscon_reset_status would always return 0
> no matter whether the status_bit was set or not.
> 
> Signed-off-by: Jiancheng Xue <xuejiancheng@hisilicon.com>

Thank you, I've added:

Fixes: cc7c2bb1493c ("reset: add TI SYSCON based reset driver")

and applied the patch.

regards
Philipp

> ---
> Change Log
> v2:
> - Refined this patch according to the suggestion from Andrew F. Davis.
> 
>  drivers/reset/reset-ti-syscon.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/reset/reset-ti-syscon.c b/drivers/reset/reset-ti-syscon.c
> index 47f0ffd..1799fd4 100644
> --- a/drivers/reset/reset-ti-syscon.c
> +++ b/drivers/reset/reset-ti-syscon.c
> @@ -154,8 +154,8 @@ static int ti_syscon_reset_status(struct reset_controller_dev *rcdev,
>  	if (ret)
>  		return ret;
>  
> -	return (reset_state & BIT(control->status_bit)) &&
> -			(control->flags & STATUS_SET);
> +	return !(reset_state & BIT(control->status_bit)) ==
> +		!(control->flags & STATUS_SET);
>  }
>  
>  static struct reset_control_ops ti_syscon_reset_ops = {

  reply	other threads:[~2016-11-30 10:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-30  1:03 Jiancheng Xue
2016-11-30 10:07 ` Philipp Zabel [this message]
2017-01-06 22:24   ` Suman Anna

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=1480500425.2527.30.camel@pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=afd@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=s-anna@ti.com \
    --cc=xuejiancheng@hisilicon.com \
    --cc=yanhaifeng@hisilicon.com \
    --cc=zhangfei.gao@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®