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: 4727031 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 970ED9F3EE for ; Fri, 15 Aug 2014 12:42:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 689C6201F2 for ; Fri, 15 Aug 2014 12:42:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8200E201ED for ; Fri, 15 Aug 2014 12:42:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751632AbaHOMlf (ORCPT ); Fri, 15 Aug 2014 08:41:35 -0400 Received: from mail-wg0-f43.google.com ([74.125.82.43]:39046 "EHLO mail-wg0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751138AbaHOMke (ORCPT ); Fri, 15 Aug 2014 08:40:34 -0400 Received: by mail-wg0-f43.google.com with SMTP id l18so2270883wgh.2 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=bvIQHICvY8Ghq6O+69GsBgRzWY61Pga8iBGFc2XIKZua31tgMSQUme71LXLibbJJV6 Cw/6J+rIVe2zjWt0B5ZRcUAcAYiRMAaiirD+8YdGBITUC3aldoAOztcwI4ud96uyVKok PO3hqUX89mrWDyX3XwHy5wpML/PmSrfqHklnL0Fn1ZvHKueZ3u+rj2LQ9fWaMSOMWtfd d4LIE7bhNmJWcs9BoSifoBBznkhpat1/huHnDr/jw2IFqPRnRdrt/x1MtPOoGWKxM4EU /QemYyiK12Jy7LJPHa2+TWCHnO1ZdbcshC51RiJ0GHJBJe7y/RY22Shj4QCkL7xDtIqP 7/rw== X-Gm-Message-State: ALoCoQmnWY44nMufvjt6XOLjoVnZqlgkGKXm+TDfiYWuJ4aOPjAP6Ans+RiZ5x1n6UjyDR88kAAb 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 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 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> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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");