mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] coresight: tpdm: remove redundant check for drvdata
@ 2025-11-07  6:16 Jie Gan
  2025-11-07 13:29 ` Suzuki K Poulose
  2025-11-07 13:35 ` Suzuki K Poulose
  0 siblings, 2 replies; 3+ messages in thread
From: Jie Gan @ 2025-11-07  6:16 UTC (permalink / raw)
  To: Suzuki K Poulose, Mike Leach, James Clark, Alexander Shishkin,
	Tingwei Zhang, Tao Zhang, Mao Jinlong
  Cc: coresight, linux-arm-kernel, linux-kernel, Jie Gan

Remove the redundant check for drvdata data because the drvdata here already
has been guarranted to be non-NULL.

Fixes: 350ba15ae187 ("coresight-tpdm: Add nodes for dsb msr support")
Fixes: 8e8804145a46 ("coresight-tpdm: Add msr register support for CMB")
Signed-off-by: Jie Gan <jie.gan@oss.qualcomm.com>
---
 drivers/hwtracing/coresight/coresight-tpdm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/hwtracing/coresight/coresight-tpdm.c b/drivers/hwtracing/coresight/coresight-tpdm.c
index 0e3896c12f07..06e0a905a67d 100644
--- a/drivers/hwtracing/coresight/coresight-tpdm.c
+++ b/drivers/hwtracing/coresight/coresight-tpdm.c
@@ -1402,11 +1402,11 @@ static int tpdm_probe(struct device *dev, struct resource *res)
 		if (ret)
 			return ret;
 
-		if (drvdata && tpdm_has_dsb_dataset(drvdata))
+		if (tpdm_has_dsb_dataset(drvdata))
 			of_property_read_u32(drvdata->dev->of_node,
 					     "qcom,dsb-msrs-num", &drvdata->dsb_msr_num);
 
-		if (drvdata && tpdm_has_cmb_dataset(drvdata))
+		if (tpdm_has_cmb_dataset(drvdata))
 			of_property_read_u32(drvdata->dev->of_node,
 					     "qcom,cmb-msrs-num", &drvdata->cmb_msr_num);
 	} else {

---
base-commit: df5d79720b152e7ff058f11ed7e88d5b5c8d2a0c
change-id: 20251107-fix_tpdm_redundant_check-a5a7bad4b7c8
prerequisite-change-id: 20251028-add_static_tpdm_support-1f62477857e2:v4
prerequisite-patch-id: eda8dd6884b831cb10affc22477aece39c78b408
prerequisite-patch-id: 7beb8b17d54ff21bc57eab10b56e6ffcfa4d1963
prerequisite-patch-id: f6f1e78dba3f1d3b1191ab827adab5a3b7b2326a

Best regards,
-- 
Jie Gan <jie.gan@oss.qualcomm.com>


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

* Re: [PATCH] coresight: tpdm: remove redundant check for drvdata
  2025-11-07  6:16 [PATCH] coresight: tpdm: remove redundant check for drvdata Jie Gan
@ 2025-11-07 13:29 ` Suzuki K Poulose
  2025-11-07 13:35 ` Suzuki K Poulose
  1 sibling, 0 replies; 3+ messages in thread
From: Suzuki K Poulose @ 2025-11-07 13:29 UTC (permalink / raw)
  To: Jie Gan, Mike Leach, James Clark, Alexander Shishkin,
	Tingwei Zhang, Tao Zhang, Mao Jinlong
  Cc: coresight, linux-arm-kernel, linux-kernel

On 07/11/2025 06:16, Jie Gan wrote:
> Remove the redundant check for drvdata data because the drvdata here already
> has been guarranted to be non-NULL.
> 
> Fixes: 350ba15ae187 ("coresight-tpdm: Add nodes for dsb msr support")
> Fixes: 8e8804145a46 ("coresight-tpdm: Add msr register support for CMB")

This doesn't need to be backported as such, as it is a cleanup. I will 
drop the Fixes tag and merge this.

Suzuki

> Signed-off-by: Jie Gan <jie.gan@oss.qualcomm.com>
> ---
>   drivers/hwtracing/coresight/coresight-tpdm.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/hwtracing/coresight/coresight-tpdm.c b/drivers/hwtracing/coresight/coresight-tpdm.c
> index 0e3896c12f07..06e0a905a67d 100644
> --- a/drivers/hwtracing/coresight/coresight-tpdm.c
> +++ b/drivers/hwtracing/coresight/coresight-tpdm.c
> @@ -1402,11 +1402,11 @@ static int tpdm_probe(struct device *dev, struct resource *res)
>   		if (ret)
>   			return ret;
>   
> -		if (drvdata && tpdm_has_dsb_dataset(drvdata))
> +		if (tpdm_has_dsb_dataset(drvdata))
>   			of_property_read_u32(drvdata->dev->of_node,
>   					     "qcom,dsb-msrs-num", &drvdata->dsb_msr_num);
>   
> -		if (drvdata && tpdm_has_cmb_dataset(drvdata))
> +		if (tpdm_has_cmb_dataset(drvdata))
>   			of_property_read_u32(drvdata->dev->of_node,
>   					     "qcom,cmb-msrs-num", &drvdata->cmb_msr_num);
>   	} else {
> 
> ---
> base-commit: df5d79720b152e7ff058f11ed7e88d5b5c8d2a0c
> change-id: 20251107-fix_tpdm_redundant_check-a5a7bad4b7c8
> prerequisite-change-id: 20251028-add_static_tpdm_support-1f62477857e2:v4
> prerequisite-patch-id: eda8dd6884b831cb10affc22477aece39c78b408
> prerequisite-patch-id: 7beb8b17d54ff21bc57eab10b56e6ffcfa4d1963
> prerequisite-patch-id: f6f1e78dba3f1d3b1191ab827adab5a3b7b2326a
> 
> Best regards,


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

* Re: [PATCH] coresight: tpdm: remove redundant check for drvdata
  2025-11-07  6:16 [PATCH] coresight: tpdm: remove redundant check for drvdata Jie Gan
  2025-11-07 13:29 ` Suzuki K Poulose
@ 2025-11-07 13:35 ` Suzuki K Poulose
  1 sibling, 0 replies; 3+ messages in thread
From: Suzuki K Poulose @ 2025-11-07 13:35 UTC (permalink / raw)
  To: Mike Leach, James Clark, Alexander Shishkin, Tingwei Zhang,
	Tao Zhang, Mao Jinlong, Jie Gan
  Cc: Suzuki K Poulose, coresight, linux-arm-kernel, linux-kernel


On Fri, 07 Nov 2025 14:16:39 +0800, Jie Gan wrote:
> Remove the redundant check for drvdata data because the drvdata here already
> has been guarranted to be non-NULL.
> 
> 

Applied, thanks!

[1/1] coresight: tpdm: remove redundant check for drvdata
      https://git.kernel.org/coresight/c/aa5edd1b5ece

Best regards,
-- 
Suzuki K Poulose <suzuki.poulose@arm.com>

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

end of thread, other threads:[~2025-11-07 13:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-07  6:16 [PATCH] coresight: tpdm: remove redundant check for drvdata Jie Gan
2025-11-07 13:29 ` Suzuki K Poulose
2025-11-07 13:35 ` Suzuki K Poulose

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®