* [PATCH v2] reset: ti_syscon: fix a ti_syscon_reset_status issue
@ 2016-11-30 1:03 Jiancheng Xue
2016-11-30 10:07 ` Philipp Zabel
0 siblings, 1 reply; 3+ messages in thread
From: Jiancheng Xue @ 2016-11-30 1:03 UTC (permalink / raw)
To: p.zabel; +Cc: linux-kernel, afd, s-anna, yanhaifeng, zhangfei.gao, xuejiancheng
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>
---
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 = {
--
1.9.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] reset: ti_syscon: fix a ti_syscon_reset_status issue
2016-11-30 1:03 [PATCH v2] reset: ti_syscon: fix a ti_syscon_reset_status issue Jiancheng Xue
@ 2016-11-30 10:07 ` Philipp Zabel
2017-01-06 22:24 ` Suman Anna
0 siblings, 1 reply; 3+ messages in thread
From: Philipp Zabel @ 2016-11-30 10:07 UTC (permalink / raw)
To: Jiancheng Xue; +Cc: linux-kernel, afd, s-anna, yanhaifeng, zhangfei.gao
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 = {
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] reset: ti_syscon: fix a ti_syscon_reset_status issue
2016-11-30 10:07 ` Philipp Zabel
@ 2017-01-06 22:24 ` Suman Anna
0 siblings, 0 replies; 3+ messages in thread
From: Suman Anna @ 2017-01-06 22:24 UTC (permalink / raw)
To: Philipp Zabel, Jiancheng Xue; +Cc: linux-kernel, afd, yanhaifeng, zhangfei.gao
Hi Philipp,
On 11/30/2016 04:07 AM, Philipp Zabel wrote:
> 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.
Haven't seen this patch hit linux-next yet. In any case, if it is not
too late,
Tested-by: Suman Anna <s-anna@ti.com>
I will post a minor following binding update patch to fix some typos.
regards
Suman
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-01-06 22:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-30 1:03 [PATCH v2] reset: ti_syscon: fix a ti_syscon_reset_status issue Jiancheng Xue
2016-11-30 10:07 ` Philipp Zabel
2017-01-06 22:24 ` Suman Anna
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®