Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1533172

Re: [PATCH v2] reset: ti_syscon: fix a ti_syscon_reset_status issue

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Philipp Zabel <p.zabel@pengutronix.de>
Newsgroups linux.kernel
Subject Re: [PATCH v2] reset: ti_syscon: fix a ti_syscon_reset_status issue
Date Wed, 30 Nov 2016 11:10:02 +0100
Message-ID <sJ9ZU-4JS-9@gated-at.bofh.it> (permalink)
References <sJ1SF-7Ky-3@gated-at.bofh.it>
Content-Type text/plain; charset="UTF-8"
X-Mailer Evolution 3.12.9-1+b1
MIME-Version 1.0
Content-Transfer-Encoding 7bit
X-Sa-Exim-Connect-IP 2001:67c:670:100:96de:80ff:fec2:9969
X-Sa-Exim-Mail-From p.zabel@pengutronix.de
X-Sa-Exim-Scanned No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false
X-Ptx-Original-Recipient linux-kernel@vger.kernel.org
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 40
Organization linux.* mail to news gateway
X-Original-Cc linux-kernel@vger.kernel.org, afd@ti.com, s-anna@ti.com, yanhaifeng@hisilicon.com, zhangfei.gao@gmail.com
X-Original-Date Wed, 30 Nov 2016 11:07:05 +0100
X-Original-Message-ID <1480500425.2527.30.camel@pengutronix.de>
X-Original-References <1480467812-32507-1-git-send-email-xuejiancheng@hisilicon.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1533172

Show key headers only | View raw


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 = {

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v2] reset: ti_syscon: fix a ti_syscon_reset_status issue Jiancheng Xue <xuejiancheng@hisilicon.com> - 2016-11-30 02:30 +0100
  Re: [PATCH v2] reset: ti_syscon: fix a ti_syscon_reset_status issue Philipp Zabel <p.zabel@pengutronix.de> - 2016-11-30 11:10 +0100

csiph-web