All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yingjoe Chen <yingjoe.chen@mediatek.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	ludovic.desroches@atmel.com,
	Yingjoe Chen <yingjoe.chen@mediatek.com>
Subject: [PATCH] pinctrl: update document for pinconf_generic_parse_dt_config
Date: Wed, 25 Nov 2015 20:13:23 +0800	[thread overview]
Message-ID: <1448453603-38980-1-git-send-email-yingjoe.chen@mediatek.com> (raw)

The returned configs from pinconf_generic_parse_dt_config() is
duplicated from original. Make it clear it must be freed when no
longer necessary.

Signed-off-by: Yingjoe Chen <yingjoe.chen@mediatek.com>
---
It seems memleak in pinctrl-mtk-common.c[1] is not alone. After a quick
glance I notice similar issues in drivers/pinctrl/pinctrl-at91-pio4.c and
drivers/pinctrl/nomadik/pinctrl-abx500.c.

I think it make sense to update document to make it clear it should be freed.

[1] http://lists.infradead.org/pipermail/linux-mediatek/2015-November/002967.html
---
 drivers/pinctrl/pinconf-generic.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pinctrl/pinconf-generic.c b/drivers/pinctrl/pinconf-generic.c
index 099a344..79e6159 100644
--- a/drivers/pinctrl/pinconf-generic.c
+++ b/drivers/pinctrl/pinconf-generic.c
@@ -220,6 +220,7 @@ static void parse_dt_cfg(struct device_node *np,
  * parse the config properties into generic pinconfig values.
  * @np: node containing the pinconfig properties
  * @configs: array with nconfigs entries containing the generic pinconf values
+ *           must be freed when no longer necessary.
  * @nconfigs: umber of configurations
  */
 int pinconf_generic_parse_dt_config(struct device_node *np,
-- 
1.9.1

WARNING: multiple messages have this Message-ID (diff)
From: Yingjoe Chen <yingjoe.chen@mediatek.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: <linux-gpio@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<ludovic.desroches@atmel.com>,
	Yingjoe Chen <yingjoe.chen@mediatek.com>
Subject: [PATCH] pinctrl: update document for pinconf_generic_parse_dt_config
Date: Wed, 25 Nov 2015 20:13:23 +0800	[thread overview]
Message-ID: <1448453603-38980-1-git-send-email-yingjoe.chen@mediatek.com> (raw)

The returned configs from pinconf_generic_parse_dt_config() is
duplicated from original. Make it clear it must be freed when no
longer necessary.

Signed-off-by: Yingjoe Chen <yingjoe.chen@mediatek.com>
---
It seems memleak in pinctrl-mtk-common.c[1] is not alone. After a quick
glance I notice similar issues in drivers/pinctrl/pinctrl-at91-pio4.c and
drivers/pinctrl/nomadik/pinctrl-abx500.c.

I think it make sense to update document to make it clear it should be freed.

[1] http://lists.infradead.org/pipermail/linux-mediatek/2015-November/002967.html
---
 drivers/pinctrl/pinconf-generic.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pinctrl/pinconf-generic.c b/drivers/pinctrl/pinconf-generic.c
index 099a344..79e6159 100644
--- a/drivers/pinctrl/pinconf-generic.c
+++ b/drivers/pinctrl/pinconf-generic.c
@@ -220,6 +220,7 @@ static void parse_dt_cfg(struct device_node *np,
  * parse the config properties into generic pinconfig values.
  * @np: node containing the pinconfig properties
  * @configs: array with nconfigs entries containing the generic pinconf values
+ *           must be freed when no longer necessary.
  * @nconfigs: umber of configurations
  */
 int pinconf_generic_parse_dt_config(struct device_node *np,
-- 
1.9.1


WARNING: multiple messages have this Message-ID (diff)
From: yingjoe.chen@mediatek.com (Yingjoe Chen)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] pinctrl: update document for pinconf_generic_parse_dt_config
Date: Wed, 25 Nov 2015 20:13:23 +0800	[thread overview]
Message-ID: <1448453603-38980-1-git-send-email-yingjoe.chen@mediatek.com> (raw)

The returned configs from pinconf_generic_parse_dt_config() is
duplicated from original. Make it clear it must be freed when no
longer necessary.

Signed-off-by: Yingjoe Chen <yingjoe.chen@mediatek.com>
---
It seems memleak in pinctrl-mtk-common.c[1] is not alone. After a quick
glance I notice similar issues in drivers/pinctrl/pinctrl-at91-pio4.c and
drivers/pinctrl/nomadik/pinctrl-abx500.c.

I think it make sense to update document to make it clear it should be freed.

[1] http://lists.infradead.org/pipermail/linux-mediatek/2015-November/002967.html
---
 drivers/pinctrl/pinconf-generic.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pinctrl/pinconf-generic.c b/drivers/pinctrl/pinconf-generic.c
index 099a344..79e6159 100644
--- a/drivers/pinctrl/pinconf-generic.c
+++ b/drivers/pinctrl/pinconf-generic.c
@@ -220,6 +220,7 @@ static void parse_dt_cfg(struct device_node *np,
  * parse the config properties into generic pinconfig values.
  * @np: node containing the pinconfig properties
  * @configs: array with nconfigs entries containing the generic pinconf values
+ *           must be freed when no longer necessary.
  * @nconfigs: umber of configurations
  */
 int pinconf_generic_parse_dt_config(struct device_node *np,
-- 
1.9.1

             reply	other threads:[~2015-11-25 12:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-25 12:13 Yingjoe Chen [this message]
2015-11-25 12:13 ` [PATCH] pinctrl: update document for pinconf_generic_parse_dt_config Yingjoe Chen
2015-11-25 12:13 ` Yingjoe Chen
2015-12-01 10:12 ` Linus Walleij
2015-12-01 10:12   ` Linus Walleij
2015-12-01 10:12   ` Linus Walleij
2015-12-01 10:26   ` Ludovic Desroches
2015-12-01 10:26     ` Ludovic Desroches
2015-12-01 10:26     ` Ludovic Desroches

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=1448453603-38980-1-git-send-email-yingjoe.chen@mediatek.com \
    --to=yingjoe.chen@mediatek.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ludovic.desroches@atmel.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.