From patchwork Sun Jan 22 21:17:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 92194 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1071647qgi; Sun, 22 Jan 2017 21:16:56 -0800 (PST) X-Received: by 10.84.238.203 with SMTP id l11mr16329807pln.95.1485148616224; Sun, 22 Jan 2017 21:16:56 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g17si12380950pgi.336.2017.01.22.21.16.55; Sun, 22 Jan 2017 21:16:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750708AbdAWFQy (ORCPT + 3 others); Mon, 23 Jan 2017 00:16:54 -0500 Received: from mail-pg0-f48.google.com ([74.125.83.48]:34118 "EHLO mail-pg0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750705AbdAWFQy (ORCPT ); Mon, 23 Jan 2017 00:16:54 -0500 Received: by mail-pg0-f48.google.com with SMTP id 14so41617315pgg.1 for ; Sun, 22 Jan 2017 21:16:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=AdtjTG7h/PowMIpObTHFAD5FykXwupMSCRG6BRy6RVI=; b=VUeXNG8EHbr9srxCRAJNvsiNqaDjPSu+80NgCYZaPVfuHwVHBr100xqkJDlZ1WAh3T toJEJKWe9cPvgFvKUSGaR+bQBqtvFDC9dKWlcKgK1QwRMTceEOxNoxnDSizBuZExocqK DAut5KiDqWyatqOlMSQaL2+znsRaCrS8VGHw4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=AdtjTG7h/PowMIpObTHFAD5FykXwupMSCRG6BRy6RVI=; b=hg2tjJ4Y8xZuhI6T+HuKxxntZOd509iDlLCivPy5xM9sPsSQL+aHeGvbOD7Ws3D4go /Q9ysd7fi8iDRuG48yR+PyjqYLsAfQJliOlt9kMU2SvpvsaLkPcljHLl5f+I9Frphlol HtBQEgFcuyBcZj1QUG863hSuMY6c7FcFFLWpyhQFeLdY6bvPYyuk133RbiM6ZfkeYKp+ 26ZFZyHMToqWqtMQ/5N6f5rkRq65TrQ5ZMrtEIwwf8dTfJ0kqWF0LFIjTEmEjihf8WjO x4Wp78g14tRB7/XkCDvTDCMTQhjNpSfskLWaJzrm3GN4KRSXNNdRuVvX7X9vk5+Xyicm rldA== X-Gm-Message-State: AIkVDXKvQaDG6xkQba2eGvI1ioegj/UxGd1Pb7if4n8bT1X3XW2Ab27RYiE51aK3QJR11nmJ X-Received: by 10.99.42.78 with SMTP id q75mr30328679pgq.144.1485148613523; Sun, 22 Jan 2017 21:16:53 -0800 (PST) Received: from localhost.localdomain (ip68-111-223-48.sd.sd.cox.net. [68.111.223.48]) by smtp.gmail.com with ESMTPSA id 18sm33169100pgf.28.2017.01.22.21.16.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 22 Jan 2017 21:16:52 -0800 (PST) From: Bjorn Andersson To: Kishon Vijay Abraham I Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH v2 1/4] phy: qcom-ufs: Don't kfree devres resource Date: Sun, 22 Jan 2017 13:17:46 -0800 Message-Id: <20170122211749.22803-1-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.11.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org Upon failing to acquire regulator supplies the qcom-ufs driver calls kfree() on the devm allocated memory used to store the name of the regulator, leading to devres corruption. Rather than switching to using the appropriate free function the patch acknowledge the fact that "name" is always a constant string and we don't actually need to create a local copy of it, but rather just reference the constant string. Fixes: add78fc05702 ("phy: qcom-ufs: Use devm sibling of kstrdup for regulator names") Cc: stable@vger.kernel.org Reviewed-by: Subhash Jadavani Signed-off-by: Bjorn Andersson --- Changes since v1: - Added fixes and Cc: stable@ - Added Subhash's reviewed-by drivers/phy/phy-qcom-ufs.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/phy/phy-qcom-ufs.c b/drivers/phy/phy-qcom-ufs.c index c69568b8543d..4d7f3c018223 100644 --- a/drivers/phy/phy-qcom-ufs.c +++ b/drivers/phy/phy-qcom-ufs.c @@ -217,12 +217,7 @@ static int __ufs_qcom_phy_init_vreg(struct device *dev, char prop_name[MAX_PROP_NAME]; - vreg->name = devm_kstrdup(dev, name, GFP_KERNEL); - if (!vreg->name) { - err = -ENOMEM; - goto out; - } - + vreg->name = name; vreg->reg = devm_regulator_get(dev, name); if (IS_ERR(vreg->reg)) { err = PTR_ERR(vreg->reg); @@ -265,8 +260,6 @@ static int __ufs_qcom_phy_init_vreg(struct device *dev, } out: - if (err) - kfree(vreg->name); return err; } From patchwork Sun Jan 22 21:17:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 92195 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1071673qgi; Sun, 22 Jan 2017 21:17:01 -0800 (PST) X-Received: by 10.99.217.85 with SMTP id e21mr22244212pgj.79.1485148621615; Sun, 22 Jan 2017 21:17:01 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j62si14506190pgc.104.2017.01.22.21.17.01; Sun, 22 Jan 2017 21:17:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750753AbdAWFQ6 (ORCPT + 25 others); Mon, 23 Jan 2017 00:16:58 -0500 Received: from mail-pf0-f170.google.com ([209.85.192.170]:35031 "EHLO mail-pf0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750729AbdAWFQ4 (ORCPT ); Mon, 23 Jan 2017 00:16:56 -0500 Received: by mail-pf0-f170.google.com with SMTP id f144so38152634pfa.2 for ; Sun, 22 Jan 2017 21:16:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=l7DMw6lErxcylnOblgHllDUR7mYjKryhZvt5s6Wu72k=; b=Jb3W49lxCJDh2tX5VM5Ky4c9r18bes+NJGUjpeVlBJGKKWGx+UYGLtgf1Spkxa9cZu sHTCX/YdPfmqvoPVT061wpMFDFpAPfPq1dS5bgKAkyVscPyN25bkuO5yUMigjSe09C1M BDggu+JLY3NA8MPb/Uv0R7bPj0RwrFJHYw6M0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=l7DMw6lErxcylnOblgHllDUR7mYjKryhZvt5s6Wu72k=; b=uTdkj46v4KW0YBvEgKY6un7hfqrxiHt+iRMBPpC4VmozBSJeET7Zdke1xo9+DJNoOx ZibrpI2CId0ONuD/Z+s/FnrH+bXguREXCulKKQm0JUNizXZVC90T5ni0iey0cJtAd4oJ pD6dqb6YbPjc66iknCs5cOYf0T5AC0+M9ITkxK9DEKpoeNRg+55HjQRJvyyhBsrXFsye 9zST/g1z4/wiIZphiOJy33w4omxef9Se9wbQAQe/P73+oSyPuGFQv7g+PD0r6kIdi/7f lb04YmCPlZPuxHqBhrZOLFmlNE8uDJyljjCdGDuaYi7UvEKNEWHzpsaNziljhTeiwU9n 82Yw== X-Gm-Message-State: AIkVDXJDkFMTyMPOZDSRvBVY36MQOUJfJVAVhVFWuQZVYCztUaFb00PShhS4zloyl+6MAHp6 X-Received: by 10.84.233.132 with SMTP id l4mr40647490plk.15.1485148615326; Sun, 22 Jan 2017 21:16:55 -0800 (PST) Received: from localhost.localdomain (ip68-111-223-48.sd.sd.cox.net. [68.111.223.48]) by smtp.gmail.com with ESMTPSA id 18sm33169100pgf.28.2017.01.22.21.16.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 22 Jan 2017 21:16:54 -0800 (PST) From: Bjorn Andersson To: Kishon Vijay Abraham I Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH v2 2/4] phy: qcom-ufs: Correct usage of regulator_get() Date: Sun, 22 Jan 2017 13:17:47 -0800 Message-Id: <20170122211749.22803-2-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170122211749.22803-1-bjorn.andersson@linaro.org> References: <20170122211749.22803-1-bjorn.andersson@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When regulator_get() tries to resolve a regulator supply but fail to find a matching property in DeviceTree it returns a dummy regulator, if a matching supply is specified but unavailable the regulator core will return an error. Based on this we should not ignore errors upon failing to acquire the optional "vddp-ref-clk" supply. Reviewed-by: Vivek Gautam Reviewed-by: Subhash Jadavani Signed-off-by: Bjorn Andersson --- Changes since v1: - Picked up reviewd-bys from Vivek and Subhash drivers/phy/phy-qcom-ufs.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) -- 2.11.0 diff --git a/drivers/phy/phy-qcom-ufs.c b/drivers/phy/phy-qcom-ufs.c index 4d7f3c018223..bbd317158084 100644 --- a/drivers/phy/phy-qcom-ufs.c +++ b/drivers/phy/phy-qcom-ufs.c @@ -210,8 +210,9 @@ int ufs_qcom_phy_init_clks(struct ufs_qcom_phy *phy_common) } EXPORT_SYMBOL_GPL(ufs_qcom_phy_init_clks); -static int __ufs_qcom_phy_init_vreg(struct device *dev, - struct ufs_qcom_phy_vreg *vreg, const char *name, bool optional) +static int ufs_qcom_phy_init_vreg(struct device *dev, + struct ufs_qcom_phy_vreg *vreg, + const char *name) { int err = 0; @@ -221,9 +222,7 @@ static int __ufs_qcom_phy_init_vreg(struct device *dev, vreg->reg = devm_regulator_get(dev, name); if (IS_ERR(vreg->reg)) { err = PTR_ERR(vreg->reg); - vreg->reg = NULL; - if (!optional) - dev_err(dev, "failed to get %s, %d\n", name, err); + dev_err(dev, "failed to get %s, %d\n", name, err); goto out; } @@ -263,12 +262,6 @@ static int __ufs_qcom_phy_init_vreg(struct device *dev, return err; } -static int ufs_qcom_phy_init_vreg(struct device *dev, - struct ufs_qcom_phy_vreg *vreg, const char *name) -{ - return __ufs_qcom_phy_init_vreg(dev, vreg, name, false); -} - int ufs_qcom_phy_init_vregulators(struct ufs_qcom_phy *phy_common) { int err; @@ -284,9 +277,9 @@ int ufs_qcom_phy_init_vregulators(struct ufs_qcom_phy *phy_common) if (err) goto out; - /* vddp-ref-clk-* properties are optional */ - __ufs_qcom_phy_init_vreg(phy_common->dev, &phy_common->vddp_ref_clk, - "vddp-ref-clk", true); + err = ufs_qcom_phy_init_vreg(phy_common->dev, &phy_common->vddp_ref_clk, + "vddp-ref-clk"); + out: return err; } From patchwork Sun Jan 22 21:17:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 92197 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1071807qgi; Sun, 22 Jan 2017 21:17:38 -0800 (PST) X-Received: by 10.99.113.85 with SMTP id b21mr29482279pgn.180.1485148658513; Sun, 22 Jan 2017 21:17:38 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w22si6049356pgm.99.2017.01.22.21.17.38; Sun, 22 Jan 2017 21:17:38 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750789AbdAWFRW (ORCPT + 25 others); Mon, 23 Jan 2017 00:17:22 -0500 Received: from mail-pf0-f171.google.com ([209.85.192.171]:33982 "EHLO mail-pf0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750728AbdAWFQ6 (ORCPT ); Mon, 23 Jan 2017 00:16:58 -0500 Received: by mail-pf0-f171.google.com with SMTP id e4so38069487pfg.1 for ; Sun, 22 Jan 2017 21:16:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=x5yYTqsLOjZURZPh+4sdgKFez4DsTVx9AmX2Kzvc2jI=; b=ZJyCpmbBdAlcp6J3LTtmgU5jQxOUNiqT9eOLIkVRnOz+049K6FesHv+lIp1tldU+j6 dk/cdR1oSwzTd6tA6i/jhRwD57SB47iwz9zHlOhgZAgct7Xt/P8mpQNdwsiKY/uyDSQS PvxGl3G5ZSvqmeyWQgxHFM1W7eZc7XoGsykFc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=x5yYTqsLOjZURZPh+4sdgKFez4DsTVx9AmX2Kzvc2jI=; b=H0vuvEcYu7+9qssb/oOz/BY22DzmD70BW8G41lYuVb+/f7QBxKSZ9Y4fnT3DIxTi0x OV87xhE25Np2rCCdSWjSou2xZiNTH0RhQmAAvwlQhv6pACL9g+jtYlhqfWnwurejZcVa 1jy8QkDlFdbpJXTgf4IkWXTvdnfmlOdaH/ke38gjeA8qTZW5weTf9Y+x3KDDcWlUkGT4 zKWnNAWqnPrWRCuf0sthMErOFjvxb1I+KJx8Tr4L6kFlp2eImRYcXmDxMDs2p/S9iKXB /ksaskwF/Y3rczXj6aYbum+t6BquGqAom3nbthkvZrpgDLAGQgkHn7dRB13hoopRHu0Q 5sIg== X-Gm-Message-State: AIkVDXKl23L+KRiZlrXcWD13yXE8CPwi4N2wF7nvZESnJ5IUgVuw/KuvtEtOaM1d/tqyzq7X X-Received: by 10.98.141.194 with SMTP id p63mr30678189pfk.185.1485148617356; Sun, 22 Jan 2017 21:16:57 -0800 (PST) Received: from localhost.localdomain (ip68-111-223-48.sd.sd.cox.net. [68.111.223.48]) by smtp.gmail.com with ESMTPSA id 18sm33169100pgf.28.2017.01.22.21.16.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 22 Jan 2017 21:16:55 -0800 (PST) From: Bjorn Andersson To: Kishon Vijay Abraham I Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v2 3/4] phy: qcom-ufs: Remove -always-on property Date: Sun, 22 Jan 2017 13:17:48 -0800 Message-Id: <20170122211749.22803-3-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170122211749.22803-1-bjorn.andersson@linaro.org> References: <20170122211749.22803-1-bjorn.andersson@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The fact that a regulator is always-on is a property of the regulator, not a specific consumer. Implementing this in the driver leads to a system behaviour that is dependent on if the Qualcomm UFS PHY was ever (partially) probed. If the specific regulator should be always on in a particular device, mark it so by specifying "regulator-always-on" in the regulator node. Reviewed-by: Vivek Gautam Reviewed-by: Subhash Jadavani Acked-by: Rob Herring Signed-off-by: Bjorn Andersson --- Changes since v1: - Picked up reviewd-bys from Vivek and Subhash Documentation/devicetree/bindings/ufs/ufs-qcom.txt | 1 - drivers/phy/phy-qcom-ufs-i.h | 1 - drivers/phy/phy-qcom-ufs.c | 5 +---- 3 files changed, 1 insertion(+), 6 deletions(-) -- 2.11.0 diff --git a/Documentation/devicetree/bindings/ufs/ufs-qcom.txt b/Documentation/devicetree/bindings/ufs/ufs-qcom.txt index b6b5130e5f65..1f69ee1a61ea 100644 --- a/Documentation/devicetree/bindings/ufs/ufs-qcom.txt +++ b/Documentation/devicetree/bindings/ufs/ufs-qcom.txt @@ -29,7 +29,6 @@ Optional properties: - vdda-pll-max-microamp : specifies max. load that can be drawn from pll supply - vddp-ref-clk-supply : phandle to UFS device ref_clk pad power supply - vddp-ref-clk-max-microamp : specifies max. load that can be drawn from this supply -- vddp-ref-clk-always-on : specifies if this supply needs to be kept always on Example: diff --git a/drivers/phy/phy-qcom-ufs-i.h b/drivers/phy/phy-qcom-ufs-i.h index d505d98cf5f8..13b02b7de30b 100644 --- a/drivers/phy/phy-qcom-ufs-i.h +++ b/drivers/phy/phy-qcom-ufs-i.h @@ -77,7 +77,6 @@ struct ufs_qcom_phy_vreg { int min_uV; int max_uV; bool enabled; - bool is_always_on; }; struct ufs_qcom_phy { diff --git a/drivers/phy/phy-qcom-ufs.c b/drivers/phy/phy-qcom-ufs.c index bbd317158084..c145fa6e824c 100644 --- a/drivers/phy/phy-qcom-ufs.c +++ b/drivers/phy/phy-qcom-ufs.c @@ -242,9 +242,6 @@ static int ufs_qcom_phy_init_vreg(struct device *dev, } err = 0; } - snprintf(prop_name, MAX_PROP_NAME, "%s-always-on", name); - vreg->is_always_on = of_property_read_bool(dev->of_node, - prop_name); } if (!strcmp(name, "vdda-pll")) { @@ -402,7 +399,7 @@ static int ufs_qcom_phy_disable_vreg(struct device *dev, { int ret = 0; - if (!vreg || !vreg->enabled || vreg->is_always_on) + if (!vreg || !vreg->enabled) goto out; ret = regulator_disable(vreg->reg); From patchwork Sun Jan 22 21:17:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 92196 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1071739qgi; Sun, 22 Jan 2017 21:17:19 -0800 (PST) X-Received: by 10.84.218.71 with SMTP id f7mr40317609plm.59.1485148639174; Sun, 22 Jan 2017 21:17:19 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d2si14502813pli.315.2017.01.22.21.17.18; Sun, 22 Jan 2017 21:17:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750756AbdAWFRB (ORCPT + 9 others); Mon, 23 Jan 2017 00:17:01 -0500 Received: from mail-pg0-f47.google.com ([74.125.83.47]:34131 "EHLO mail-pg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750755AbdAWFQ7 (ORCPT ); Mon, 23 Jan 2017 00:16:59 -0500 Received: by mail-pg0-f47.google.com with SMTP id 14so41618074pgg.1 for ; Sun, 22 Jan 2017 21:16:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=nK84NeAsMaCGhXTer2kQwSxy6+duf7rctt/qNBXJJec=; b=CwenbdQsTFBlaF2glMt/R9AQhI+9ZVhfejW8yxUe5Jn0F/zeKPWQZL8bZnzDq2CC8Q LPppvajTlSnvcTYOEAjEWotM6RU5W3mKbmFXn8pNGLFvrvkVIZFOEaDI3reLUVuE1L7l 3WR3bHhZW1rgvuR372H2zbGGRO9MC8rTPjmYE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=nK84NeAsMaCGhXTer2kQwSxy6+duf7rctt/qNBXJJec=; b=ZH6xNZiF7igetdbWihW9Lix2iE5TvPlypvp3rIfrG79noym6Avdmn7HaFh28hn6xHe yC8AqkyacsMHk687D/KN/v3ISA/G1qW9SiPFr7Zsqftt0CG7J71mqx8Ak8kkc/4tPNh2 HGJxMzf/GpkxAo60CMtd9ooQAos9znRq02lF0PcMisYOPotW6aTKf7gV3n5C7DtGfVyt tR7NlNifuFCK3k0uIXOx6zcSYyYC9EVmzGlc1gS3aPwpbgDw8FlMTJjFxWcnScCXfooI mCQvtUOqlN3LnoYEyvdAv9VbCUWvHXagAb+ez4lm3Ez4seHMOkXJYi2TLv3JaJL9ir5h rE3Q== X-Gm-Message-State: AIkVDXKOsOaXiXPte/ahbOeBZyA+dhb9YyixILkLsS0c1L4r2G625elIhusA5kEMr21zFhiE X-Received: by 10.98.160.140 with SMTP id p12mr29712550pfl.97.1485148619162; Sun, 22 Jan 2017 21:16:59 -0800 (PST) Received: from localhost.localdomain (ip68-111-223-48.sd.sd.cox.net. [68.111.223.48]) by smtp.gmail.com with ESMTPSA id 18sm33169100pgf.28.2017.01.22.21.16.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 22 Jan 2017 21:16:58 -0800 (PST) From: Bjorn Andersson To: Kishon Vijay Abraham I Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH v2 4/4] phy: qcom-ufs: Suppress extraneous logging Date: Sun, 22 Jan 2017 13:17:49 -0800 Message-Id: <20170122211749.22803-4-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170122211749.22803-1-bjorn.andersson@linaro.org> References: <20170122211749.22803-1-bjorn.andersson@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The error paths of the common qcom-ufs functions for registering the phy, acquiring clocks and acquiring regulators all print specific error messages before returning an error, so there is no value in printing yet another - more generic - message when this occur. Reviewed-by: Vivek Gautam Reviewed-by: Subhash Jadavani Signed-off-by: Bjorn Andersson --- Changes since v1: - Picked up reviewed-bys from Vivek and Subhash drivers/phy/phy-qcom-ufs-qmp-14nm.c | 15 +++------------ drivers/phy/phy-qcom-ufs-qmp-20nm.c | 12 ++---------- 2 files changed, 5 insertions(+), 22 deletions(-) -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/phy/phy-qcom-ufs-qmp-14nm.c b/drivers/phy/phy-qcom-ufs-qmp-14nm.c index c71c84734916..12a1b498dc4b 100644 --- a/drivers/phy/phy-qcom-ufs-qmp-14nm.c +++ b/drivers/phy/phy-qcom-ufs-qmp-14nm.c @@ -132,27 +132,18 @@ static int ufs_qcom_phy_qmp_14nm_probe(struct platform_device *pdev) &ufs_qcom_phy_qmp_14nm_phy_ops, &phy_14nm_ops); if (!generic_phy) { - dev_err(dev, "%s: ufs_qcom_phy_generic_probe() failed\n", - __func__); err = -EIO; goto out; } err = ufs_qcom_phy_init_clks(phy_common); - if (err) { - dev_err(phy_common->dev, - "%s: ufs_qcom_phy_init_clks() failed %d\n", - __func__, err); + if (err) goto out; - } err = ufs_qcom_phy_init_vregulators(phy_common); - if (err) { - dev_err(phy_common->dev, - "%s: ufs_qcom_phy_init_vregulators() failed %d\n", - __func__, err); + if (err) goto out; - } + phy_common->vdda_phy.max_uV = UFS_PHY_VDDA_PHY_UV; phy_common->vdda_phy.min_uV = UFS_PHY_VDDA_PHY_UV; diff --git a/drivers/phy/phy-qcom-ufs-qmp-20nm.c b/drivers/phy/phy-qcom-ufs-qmp-20nm.c index 1a26a64e06d3..4f68acb58b73 100644 --- a/drivers/phy/phy-qcom-ufs-qmp-20nm.c +++ b/drivers/phy/phy-qcom-ufs-qmp-20nm.c @@ -190,25 +190,17 @@ static int ufs_qcom_phy_qmp_20nm_probe(struct platform_device *pdev) &ufs_qcom_phy_qmp_20nm_phy_ops, &phy_20nm_ops); if (!generic_phy) { - dev_err(dev, "%s: ufs_qcom_phy_generic_probe() failed\n", - __func__); err = -EIO; goto out; } err = ufs_qcom_phy_init_clks(phy_common); - if (err) { - dev_err(phy_common->dev, "%s: ufs_qcom_phy_init_clks() failed %d\n", - __func__, err); + if (err) goto out; - } err = ufs_qcom_phy_init_vregulators(phy_common); - if (err) { - dev_err(phy_common->dev, "%s: ufs_qcom_phy_init_vregulators() failed %d\n", - __func__, err); + if (err) goto out; - } ufs_qcom_phy_qmp_20nm_advertise_quirks(phy_common);