All of lore.kernel.org
 help / color / mirror / Atom feed
From: Will Deacon <will.deacon@arm.com>
To: Suzuki K Poulose <Suzuki.Poulose@arm.com>
Cc: Peter Chen <peter.chen@nxp.com>,
	linux-renesas-soc@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
	linux-samsung-soc@vger.kernel.org,
	Sudeep Holla <Sudeep.Holla@arm.com>
Subject: Re: [PATCH 4/7] bus: arm-cci: add missing of_node_put after calling of_parse_phandle
Date: Fri, 1 Jul 2016 11:33:47 +0100	[thread overview]
Message-ID: <20160701103346.GF12735@arm.com> (raw)
In-Reply-To: <57764626.4060800@arm.com>

On Fri, Jul 01, 2016 at 11:29:58AM +0100, Suzuki K Poulose wrote:
> On 01/07/16 10:41, Peter Chen wrote:
> >of_node_put needs to be called when the device node which is got
> >from of_parse_phandle has finished using.
> >
> >Cc: Will Deacon <will.deacon@arm.com>
> >Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
> >Signed-off-by: Peter Chen <peter.chen@nxp.com>
> 
> Thanks for the fix.
> 
> >---
> >  drivers/bus/arm-cci.c | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> >
> >diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c
> >index a49b283..e7b0b8c 100644
> >--- a/drivers/bus/arm-cci.c
> >+++ b/drivers/bus/arm-cci.c
> >@@ -1912,9 +1912,12 @@ static int __cci_ace_get_port(struct device_node *dn, int type)
> >  	cci_portn = of_parse_phandle(dn, "cci-control-port", 0);
> >  	for (i = 0; i < nb_cci_ports; i++) {
> >  		ace_match = ports[i].type == type;
> >-		if (ace_match && cci_portn == ports[i].dn)
> >+		if (ace_match && cci_portn == ports[i].dn) {
> >+			of_node_put(cci_portn);
> >  			return i;
> >+		}
> >  	}
> >+	of_node_put(cci_portn);
> 
> nit: Could we please do some thing like this ?
> 		if (ace_match && cci_portn == ports[i].dn)
> 			break;
> 	}
> 
> 	of_node_put(cci_portn);
> 	return (i < nb_cci_ports) ? i : -ENODEV ;
> 
> Either way,
> 
> Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>

Please route this via arm-soc once you've addressed Suzuki's comment.

Will

WARNING: multiple messages have this Message-ID (diff)
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/7] bus: arm-cci: add missing of_node_put after calling of_parse_phandle
Date: Fri, 1 Jul 2016 11:33:47 +0100	[thread overview]
Message-ID: <20160701103346.GF12735@arm.com> (raw)
In-Reply-To: <57764626.4060800@arm.com>

On Fri, Jul 01, 2016 at 11:29:58AM +0100, Suzuki K Poulose wrote:
> On 01/07/16 10:41, Peter Chen wrote:
> >of_node_put needs to be called when the device node which is got
> >from of_parse_phandle has finished using.
> >
> >Cc: Will Deacon <will.deacon@arm.com>
> >Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
> >Signed-off-by: Peter Chen <peter.chen@nxp.com>
> 
> Thanks for the fix.
> 
> >---
> >  drivers/bus/arm-cci.c | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> >
> >diff --git a/drivers/bus/arm-cci.c b/drivers/bus/arm-cci.c
> >index a49b283..e7b0b8c 100644
> >--- a/drivers/bus/arm-cci.c
> >+++ b/drivers/bus/arm-cci.c
> >@@ -1912,9 +1912,12 @@ static int __cci_ace_get_port(struct device_node *dn, int type)
> >  	cci_portn = of_parse_phandle(dn, "cci-control-port", 0);
> >  	for (i = 0; i < nb_cci_ports; i++) {
> >  		ace_match = ports[i].type == type;
> >-		if (ace_match && cci_portn == ports[i].dn)
> >+		if (ace_match && cci_portn == ports[i].dn) {
> >+			of_node_put(cci_portn);
> >  			return i;
> >+		}
> >  	}
> >+	of_node_put(cci_portn);
> 
> nit: Could we please do some thing like this ?
> 		if (ace_match && cci_portn == ports[i].dn)
> 			break;
> 	}
> 
> 	of_node_put(cci_portn);
> 	return (i < nb_cci_ports) ? i : -ENODEV ;
> 
> Either way,
> 
> Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>

Please route this via arm-soc once you've addressed Suzuki's comment.

Will

  reply	other threads:[~2016-07-01 10:33 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-01  9:41 [PATCH 0/7] add missing of_node_put after calling of_parse_phandle (1st) Peter Chen
2016-07-01  9:41 ` Peter Chen
2016-07-01  9:41 ` [PATCH 1/7] extcon: add missing of_node_put after calling of_parse_phandle Peter Chen
2016-07-01  9:41   ` Peter Chen
2016-07-01  9:41   ` Peter Chen
2016-07-02  4:46   ` Chanwoo Choi
2016-07-02  4:46     ` Chanwoo Choi
2016-07-02  4:46     ` Chanwoo Choi
2016-07-01  9:41 ` [PATCH 2/7] arm: mach-shmobile: pm-rmobile: " Peter Chen
2016-07-01  9:41   ` Peter Chen
2016-07-01  9:41   ` Peter Chen
2016-07-01 12:31   ` Geert Uytterhoeven
2016-07-01 12:31     ` Geert Uytterhoeven
2016-07-04  2:10     ` Peter Chen
2016-07-04  2:10       ` Peter Chen
2016-07-04  2:10       ` Peter Chen
2016-07-01  9:41 ` [PATCH 3/7] arm: mach-u300: regulator: " Peter Chen
2016-07-01  9:41 ` Peter Chen
2016-07-01  9:41 ` Peter Chen
2016-07-01  9:41 ` Peter Chen
2016-07-01  9:41 ` Peter Chen
2016-07-01  9:41   ` Peter Chen
2016-07-05 21:24   ` Linus Walleij
2016-07-05 21:24     ` Linus Walleij
2016-07-01  9:41 ` [PATCH 4/7] bus: arm-cci: " Peter Chen
2016-07-01  9:41   ` Peter Chen
2016-07-01  9:41   ` Peter Chen
2016-07-01 10:29   ` Suzuki K Poulose
2016-07-01 10:29     ` Suzuki K Poulose
2016-07-01 10:33     ` Will Deacon [this message]
2016-07-01 10:33       ` Will Deacon
2016-07-04  2:48       ` Peter Chen
2016-07-04  2:48         ` Peter Chen
2016-07-04  2:48         ` Peter Chen
2016-07-04  9:19         ` Will Deacon
2016-07-04  9:19           ` Will Deacon
2016-07-01  9:41 ` [PATCH 5/7] bus: vexpress-config: " Peter Chen
2016-07-01  9:41   ` Peter Chen
2016-07-01  9:41   ` Peter Chen
2016-07-11  9:02   ` Liviu Dudau
2016-07-11  9:02     ` Liviu Dudau
2016-07-01  9:42 ` [PATCH 6/7] devfreq: " Peter Chen
2016-07-01  9:42   ` Peter Chen
2016-07-01  9:42   ` Peter Chen
2016-07-01  9:42 ` [PATCH 7/7] devfreq: exynos-bus: " Peter Chen
2016-07-01  9:42   ` Peter Chen
2016-07-01  9:42   ` Peter Chen
2016-07-02  4:53   ` Chanwoo Choi
2016-07-02  4:53     ` Chanwoo Choi
     [not found] ` <CGME20160701094923epcas1p164cc8773ec44a00dfc506a6192df3409@epcas1p1.samsung.com>
2016-07-06  2:38   ` [PATCH 6/7] devfreq: " MyungJoo Ham
2016-07-06  2:38     ` MyungJoo Ham
     [not found] ` <CGME20160701094927epcas1p43f956ee3465f96e2f9c99b44c0f5b49d@epcas1p4.samsung.com>
2016-07-06  2:47   ` [PATCH 7/7] devfreq: exynos-bus: " MyungJoo Ham
2016-07-06  2:47     ` MyungJoo Ham

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=20160701103346.GF12735@arm.com \
    --to=will.deacon@arm.com \
    --cc=Sudeep.Holla@arm.com \
    --cc=Suzuki.Poulose@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=peter.chen@nxp.com \
    /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 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.