All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 6.6.y] reset: starfive: jh71x0: Fix accessing the empty member on JH7110 SoC
@ 2025-03-28  0:38 jianqi.ren.cn
  2025-03-28 17:03 ` Sasha Levin
  0 siblings, 1 reply; 2+ messages in thread
From: jianqi.ren.cn @ 2025-03-28  0:38 UTC (permalink / raw)
  To: stable
  Cc: patches, gregkh, linux-kernel, jianqi.ren.cn, changhuang.liang,
	kernel, hal.feng, p.zabel, conor.dooley

From: Changhuang Liang <changhuang.liang@starfivetech.com>

[ Upstream commit 2cf59663660799ce16f4dfbed97cdceac7a7fa11 ]

data->asserted will be NULL on JH7110 SoC since commit 82327b127d41
("reset: starfive: Add StarFive JH7110 reset driver") was added. Add
the judgment condition to avoid errors when calling reset_control_status
on JH7110 SoC.

Fixes: 82327b127d41 ("reset: starfive: Add StarFive JH7110 reset driver")
Signed-off-by: Changhuang Liang <changhuang.liang@starfivetech.com>
Acked-by: Hal Feng <hal.feng@starfivetech.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Link: https://lore.kernel.org/r/20240925112442.1732416-1-changhuang.liang@starfivetech.com
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Jianqi Ren <jianqi.ren.cn@windriver.com>
Signed-off-by: He Zhe <zhe.he@windriver.com>
---
Verified the build test
---
 drivers/reset/starfive/reset-starfive-jh71x0.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/reset/starfive/reset-starfive-jh71x0.c b/drivers/reset/starfive/reset-starfive-jh71x0.c
index 55bbbd2de52c..29ce3486752f 100644
--- a/drivers/reset/starfive/reset-starfive-jh71x0.c
+++ b/drivers/reset/starfive/reset-starfive-jh71x0.c
@@ -94,6 +94,9 @@ static int jh71x0_reset_status(struct reset_controller_dev *rcdev,
 	void __iomem *reg_status = data->status + offset * sizeof(u32);
 	u32 value = readl(reg_status);
 
+	if (!data->asserted)
+		return !(value & mask);
+
 	return !((value ^ data->asserted[offset]) & mask);
 }
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 6.6.y] reset: starfive: jh71x0: Fix accessing the empty member on JH7110 SoC
  2025-03-28  0:38 [PATCH 6.6.y] reset: starfive: jh71x0: Fix accessing the empty member on JH7110 SoC jianqi.ren.cn
@ 2025-03-28 17:03 ` Sasha Levin
  0 siblings, 0 replies; 2+ messages in thread
From: Sasha Levin @ 2025-03-28 17:03 UTC (permalink / raw)
  To: stable; +Cc: jianqi.ren.cn, Sasha Levin

[ Sasha's backport helper bot ]

Hi,

✅ All tests passed successfully. No issues detected.
No action required from the submitter.

The upstream commit SHA1 provided is correct: 2cf59663660799ce16f4dfbed97cdceac7a7fa11

WARNING: Author mismatch between patch and upstream commit:
Backport author: <jianqi.ren.cn@windriver.com>
Commit author: Changhuang Liang<changhuang.liang@starfivetech.com>

Status in newer kernel trees:
6.13.y | Present (exact SHA1)
6.12.y | Present (exact SHA1)

Note: The patch differs from the upstream commit:
---
1:  2cf5966366079 ! 1:  525e760e970b6 reset: starfive: jh71x0: Fix accessing the empty member on JH7110 SoC
    @@ Metadata
      ## Commit message ##
         reset: starfive: jh71x0: Fix accessing the empty member on JH7110 SoC
     
    +    [ Upstream commit 2cf59663660799ce16f4dfbed97cdceac7a7fa11 ]
    +
         data->asserted will be NULL on JH7110 SoC since commit 82327b127d41
         ("reset: starfive: Add StarFive JH7110 reset driver") was added. Add
         the judgment condition to avoid errors when calling reset_control_status
    @@ Commit message
         Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
         Link: https://lore.kernel.org/r/20240925112442.1732416-1-changhuang.liang@starfivetech.com
         Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
    +    Signed-off-by: Jianqi Ren <jianqi.ren.cn@windriver.com>
    +    Signed-off-by: He Zhe <zhe.he@windriver.com>
     
      ## drivers/reset/starfive/reset-starfive-jh71x0.c ##
     @@ drivers/reset/starfive/reset-starfive-jh71x0.c: static int jh71x0_reset_status(struct reset_controller_dev *rcdev,
---

Results of testing on various branches:

| Branch                    | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-6.6.y        |  Success    |  Success   |

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-03-28 17:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-28  0:38 [PATCH 6.6.y] reset: starfive: jh71x0: Fix accessing the empty member on JH7110 SoC jianqi.ren.cn
2025-03-28 17:03 ` Sasha Levin

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.