From patchwork Fri Aug 15 12:40:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 4727131 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 63249C033A for ; Fri, 15 Aug 2014 12:44:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 80B4F201F2 for ; Fri, 15 Aug 2014 12:44:29 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A80E5201BC for ; Fri, 15 Aug 2014 12:44:28 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XIGot-0008GR-SE; Fri, 15 Aug 2014 12:41:23 +0000 Received: from mail-wi0-f172.google.com ([209.85.212.172]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XIGoR-0007mR-7W for linux-arm-kernel@lists.infradead.org; Fri, 15 Aug 2014 12:40:55 +0000 Received: by mail-wi0-f172.google.com with SMTP id n3so777772wiv.17 for ; Fri, 15 Aug 2014 05:40:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1Z7gN7areTc6NH3wcc01DKV+UcHrl8NlFWZMLWKG4sY=; b=RA5iNbS2p4sJ7pwVTlYMGNXuKFCaAV9Vu+HYKRi1H+zXMs1cTOiW7CVhPt5eY3giqR e2VS4it/ehLTqzM1ffgqi/xlJIHkhBWbnF0YpcgHmnl6UUkc/Y62eY/8as198TxXX4+Q aUgJdjTN7UzfVLNuqYnI8wddiIkSHJAgVB5JFOi8Tfn9YZhLn4/zNHSnSnUozYrymT92 k/CWAEKaulXwOWctAHjSgEiqHJpCVkSis/rU832id7rM4zGIVf9lLkDA8XgRO5ZPOChC XaNITPifgPw87+u8/X0qBYgu3/1UaI2s9omtTSQ7Enl26kuF1tZOKqUFGhYJ0OT/sjE1 CI5Q== X-Gm-Message-State: ALoCoQntpNwC5O4TGeYavjTP5CwhdEYWeKJpuyhHRigTS8AK2GRGR6FwBKnJ7f3BJgP6WTqU0M5N X-Received: by 10.180.14.5 with SMTP id l5mr20754387wic.50.1408106433429; Fri, 15 Aug 2014 05:40:33 -0700 (PDT) Received: from localhost.localdomain (cpc14-aztw22-2-0-cust189.18-1.cable.virginm.net. [82.45.1.190]) by mx.google.com with ESMTPSA id fr2sm6486559wib.7.2014.08.15.05.40.31 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 15 Aug 2014 05:40:32 -0700 (PDT) From: Peter Griffin 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 Subject: [PATCH 6/9] phy: phy-spear1340-miphy: Remove unncessary site specific OOM messages Date: Fri, 15 Aug 2014 13:40:13 +0100 Message-Id: <1408106416-19044-7-git-send-email-peter.griffin@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1408106416-19044-1-git-send-email-peter.griffin@linaro.org> References: <1408106416-19044-1-git-send-email-peter.griffin@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140815_054055_423619_D1CD5521 X-CRM114-Status: GOOD ( 11.19 ) X-Spam-Score: -0.7 (/) Cc: peter.griffin@linaro.org, lee.jones@linaro.org, patches@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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");