From: Liang He <windhl@126.com>
To: mpe@ellerman.id.au, benh@kernel.crashing.org, paulus@samba.org,
linuxppc-dev@lists.ozlabs.org, windhl@126.com
Subject: [PATCH] powerpc: fsl: gtm: Remove of_node_get() in fsl_gtm_init()
Date: Mon, 4 Jul 2022 22:46:35 +0800 [thread overview]
Message-ID: <20220704144635.278394-1-windhl@126.com> (raw)
for_each_compatible_node() will automaitically increase and decrease
the refcount of the device_node object. There is no need to call
additional of_node_get(). It is better to keep the original meaning
of refcounting as there is no any new reference created.
Signed-off-by: Liang He <windhl@126.com>
---
I do not understand the whole story of the gtm, so maybe we want to
keep the object always alive by using additional refcounting. Please
check it carefully.
arch/powerpc/sysdev/fsl_gtm.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/arch/powerpc/sysdev/fsl_gtm.c b/arch/powerpc/sysdev/fsl_gtm.c
index 39186ad6b3c3..e13ebd2be416 100644
--- a/arch/powerpc/sysdev/fsl_gtm.c
+++ b/arch/powerpc/sysdev/fsl_gtm.c
@@ -423,7 +423,6 @@ static int __init fsl_gtm_init(void)
/* We don't want to lose the node and its ->data */
np->data = gtm;
- of_node_get(np);
continue;
err:
--
2.25.1
reply other threads:[~2022-07-04 14:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220704144635.278394-1-windhl@126.com \
--to=windhl@126.com \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.org \
/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;
as well as URLs for NNTP newsgroup(s).