All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Griffin <peter.griffin@linaro.org>
To: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, kishon@ti.com,
	kgene.kim@samsung.com, maxime.ripard@free-electrons.com,
	linux-samsung-soc@vger.kernel.org
Cc: peter.griffin@linaro.org, patches@linaro.org, lee.jones@linaro.org
Subject: [PATCH 6/9] phy: phy-spear1340-miphy: Remove unncessary site specific OOM messages
Date: Fri, 15 Aug 2014 13:40:13 +0100	[thread overview]
Message-ID: <1408106416-19044-7-git-send-email-peter.griffin@linaro.org> (raw)
In-Reply-To: <1408106416-19044-1-git-send-email-peter.griffin@linaro.org>

The site specific OOM messages are unncessary, because they duplicate
messages from the memory subsystem which include dump_stack().

Removing these superflous messages makes the kernel smaller. A discussion
here http://patchwork.ozlabs.org/patch/324158/ found that all error paths
from kzalloc will print a error message, and that any error path which maybe
found which doesn't would be considered a bug in kzalloc.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
---
 drivers/phy/phy-spear1340-miphy.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/phy/phy-spear1340-miphy.c b/drivers/phy/phy-spear1340-miphy.c
index 7135ba2..ee4d66f 100644
--- a/drivers/phy/phy-spear1340-miphy.c
+++ b/drivers/phy/phy-spear1340-miphy.c
@@ -249,10 +249,8 @@ static int spear1340_miphy_probe(struct platform_device *pdev)
 	struct phy_provider *phy_provider;
 
 	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
-	if (!priv) {
-		dev_err(dev, "can't alloc spear1340_miphy private date memory\n");
+	if (!priv)
 		return -ENOMEM;
-	}
 
 	priv->misc =
 		syscon_regmap_lookup_by_phandle(dev->of_node, "misc");
-- 
1.9.1


WARNING: multiple messages have this Message-ID (diff)
From: Peter Griffin <peter.griffin@linaro.org>
To: linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, kishon@ti.com,
	kgene.kim@samsung.com, maxime.ripard@free-electrons.com,
	linux-samsung-soc@vger.kernel.org
Cc: peter.griffin@linaro.org, lee.jones@linaro.org, patches@linaro.org
Subject: [PATCH 6/9] phy: phy-spear1340-miphy: Remove unncessary site specific OOM messages
Date: Fri, 15 Aug 2014 13:40:13 +0100	[thread overview]
Message-ID: <1408106416-19044-7-git-send-email-peter.griffin@linaro.org> (raw)
In-Reply-To: <1408106416-19044-1-git-send-email-peter.griffin@linaro.org>

The site specific OOM messages are unncessary, because they duplicate
messages from the memory subsystem which include dump_stack().

Removing these superflous messages makes the kernel smaller. A discussion
here http://patchwork.ozlabs.org/patch/324158/ found that all error paths
from kzalloc will print a error message, and that any error path which maybe
found which doesn't would be considered a bug in kzalloc.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
---
 drivers/phy/phy-spear1340-miphy.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/phy/phy-spear1340-miphy.c b/drivers/phy/phy-spear1340-miphy.c
index 7135ba2..ee4d66f 100644
--- a/drivers/phy/phy-spear1340-miphy.c
+++ b/drivers/phy/phy-spear1340-miphy.c
@@ -249,10 +249,8 @@ static int spear1340_miphy_probe(struct platform_device *pdev)
 	struct phy_provider *phy_provider;
 
 	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
-	if (!priv) {
-		dev_err(dev, "can't alloc spear1340_miphy private date memory\n");
+	if (!priv)
 		return -ENOMEM;
-	}
 
 	priv->misc =
 		syscon_regmap_lookup_by_phandle(dev->of_node, "misc");
-- 
1.9.1

WARNING: multiple messages have this Message-ID (diff)
From: peter.griffin@linaro.org (Peter Griffin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 6/9] phy: phy-spear1340-miphy: Remove unncessary site specific OOM messages
Date: Fri, 15 Aug 2014 13:40:13 +0100	[thread overview]
Message-ID: <1408106416-19044-7-git-send-email-peter.griffin@linaro.org> (raw)
In-Reply-To: <1408106416-19044-1-git-send-email-peter.griffin@linaro.org>

The site specific OOM messages are unncessary, because they duplicate
messages from the memory subsystem which include dump_stack().

Removing these superflous messages makes the kernel smaller. A discussion
here http://patchwork.ozlabs.org/patch/324158/ found that all error paths
from kzalloc will print a error message, and that any error path which maybe
found which doesn't would be considered a bug in kzalloc.

Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
---
 drivers/phy/phy-spear1340-miphy.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/phy/phy-spear1340-miphy.c b/drivers/phy/phy-spear1340-miphy.c
index 7135ba2..ee4d66f 100644
--- a/drivers/phy/phy-spear1340-miphy.c
+++ b/drivers/phy/phy-spear1340-miphy.c
@@ -249,10 +249,8 @@ static int spear1340_miphy_probe(struct platform_device *pdev)
 	struct phy_provider *phy_provider;
 
 	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
-	if (!priv) {
-		dev_err(dev, "can't alloc spear1340_miphy private date memory\n");
+	if (!priv)
 		return -ENOMEM;
-	}
 
 	priv->misc =
 		syscon_regmap_lookup_by_phandle(dev->of_node, "misc");
-- 
1.9.1

  parent reply	other threads:[~2014-08-15 12:41 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-15 12:40 [PATCH 0/9] phy: various misc cleanups to phy drivers Peter Griffin
2014-08-15 12:40 ` Peter Griffin
2014-08-15 12:40 ` [PATCH 1/9] phy: phy-omap-control: Remove unncessary site specific OOM messages Peter Griffin
2014-08-15 12:40   ` Peter Griffin
2014-08-15 12:40 ` [PATCH 2/9] phy: phy-mvebu-sata: Add missing error check for devm_kzalloc Peter Griffin
2014-08-15 12:40   ` Peter Griffin
2014-08-15 12:40   ` Peter Griffin
2014-08-15 13:10   ` Andrew Lunn
2014-08-15 13:10     ` Andrew Lunn
2014-08-15 12:40 ` [PATCH 3/9] phy: phy-omap-usb2: Remove unncessary site specific OOM messages Peter Griffin
2014-08-15 12:40   ` Peter Griffin
2014-08-15 12:40   ` Peter Griffin
2014-08-15 12:40 ` [PATCH 4/9] phy: phy-ti-pipe3: " Peter Griffin
2014-08-15 12:40   ` Peter Griffin
2014-08-15 12:40 ` [PATCH 5/9] phy: phy-spear1310-miphy: " Peter Griffin
2014-08-15 12:40   ` Peter Griffin
2014-08-15 12:40   ` Peter Griffin
2014-08-15 12:40 ` Peter Griffin [this message]
2014-08-15 12:40   ` [PATCH 6/9] phy: phy-spear1340-miphy: " Peter Griffin
2014-08-15 12:40   ` Peter Griffin
2014-08-15 12:40 ` [PATCH 7/9] phy: remove .owner field for drivers using module_platform_driver Peter Griffin
2014-08-15 12:40   ` Peter Griffin
2014-09-17 16:19   ` Kishon Vijay Abraham I
2014-09-17 16:19     ` Kishon Vijay Abraham I
2014-09-17 16:19     ` Kishon Vijay Abraham I
2014-09-17 19:04     ` Peter Griffin
2014-09-17 19:04       ` Peter Griffin
2014-09-18  5:32       ` Kishon Vijay Abraham I
2014-09-18  5:32         ` Kishon Vijay Abraham I
2014-09-18  5:32         ` Kishon Vijay Abraham I
2014-08-15 12:40 ` [PATCH 8/9] phy: phy-spear1310-miphy: Use module_platform_driver to register driver Peter Griffin
2014-08-15 12:40   ` Peter Griffin
2014-08-15 12:40 ` [PATCH 9/9] phy: phy-spear1340-miphy: " Peter Griffin
2014-08-15 12:40   ` Peter Griffin
2014-08-20 15:03 ` [PATCH 0/9] phy: various misc cleanups to phy drivers Kishon Vijay Abraham I
2014-08-20 15:03   ` Kishon Vijay Abraham I
2014-08-20 15:03   ` Kishon Vijay Abraham I

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=1408106416-19044-7-git-send-email-peter.griffin@linaro.org \
    --to=peter.griffin@linaro.org \
    --cc=kgene.kim@samsung.com \
    --cc=kishon@ti.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=maxime.ripard@free-electrons.com \
    --cc=patches@linaro.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 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.