From patchwork Thu Jan 19 10:47:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 92019 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp422024qgi; Thu, 19 Jan 2017 10:47:12 -0800 (PST) X-Received: by 10.98.76.132 with SMTP id e4mr11866043pfj.24.1484851632660; Thu, 19 Jan 2017 10:47:12 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 134si4316027pgh.30.2017.01.19.10.47.12; Thu, 19 Jan 2017 10:47:12 -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 S1754397AbdASSrK (ORCPT + 25 others); Thu, 19 Jan 2017 13:47:10 -0500 Received: from mail-pg0-f52.google.com ([74.125.83.52]:36447 "EHLO mail-pg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754212AbdASSrI (ORCPT ); Thu, 19 Jan 2017 13:47:08 -0500 Received: by mail-pg0-f52.google.com with SMTP id t6so16213634pgt.3 for ; Thu, 19 Jan 2017 10:46:49 -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=qCo+G7w6lHti6FAZzsB2N1B7HO48drIV4MRYiQrujKo=; b=O0Nbv7Xkg5OelymFQQXn64wrV1Zms+FV6Jj+5SPV8hDoWVsRcF5dv0//xv6m7OzlzT FulBs0IVNQvbKxwarD2pWngSXrnmxZhk9gIY/WzQiG+85T8Wk8aMRZWC0jPrU0el40O9 7E5M5dlbMEYJbfOJ6GwK28QPNXxlNxRsKaVCs= 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=qCo+G7w6lHti6FAZzsB2N1B7HO48drIV4MRYiQrujKo=; b=HYdJy0o5qLXKNiHtT4m4qZviwdcPknBnoaLe/oO7XnegefXx1I7nWy8Zgy3kuCHSLb ccQdfYpxe6qXEKq1McrvXfizdDpFj1728iZDkWB/VefaCO701h+3xz0mt+xhKyaQc8wi 1WtwGoyK3PKtuyTjdgnwHJOWhzgVfgkhAan0GcUDjtSNIZNuD0QOAE6C8qXQfX6L4i/U vJyqAF30Pgsb4W5I6r9LOX5cI0CtaOPXIRtSe49Ois2BRrYCnOyx0k2KdjVEeRccAavF y6cjB9ljs/DT77qKgcCNRtT+ZfQ7kc3C5lgjRhDIjRvn9lWYOz6dpBYYtK4R9TnGke1K E/iw== X-Gm-Message-State: AIkVDXKLng1bvZcDi3laUhjiMM5K6JbaYqzMHR0MzKCwwIQRQsC8ZXTgt8YYmpHr5JRqhgkb X-Received: by 10.99.125.68 with SMTP id m4mr11836430pgn.13.1484851609167; Thu, 19 Jan 2017 10:46:49 -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 w76sm10552990pfd.74.2017.01.19.10.46.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Jan 2017 10:46:48 -0800 (PST) From: Bjorn Andersson To: Kishon Vijay Abraham I Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Subhash Jadavani , Vivek Gautam Subject: [PATCH 1/4] phy: qcom-ufs: Don't kfree devres resource Date: Thu, 19 Jan 2017 02:47:36 -0800 Message-Id: <20170119104739.4376-1-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.11.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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. Cc: Subhash Jadavani Cc: Vivek Gautam Signed-off-by: Bjorn Andersson --- drivers/phy/phy-qcom-ufs.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) -- 2.11.0 Reviewed-by: Subhash Jadavani 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 Thu Jan 19 10:47:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 92018 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp422019qgi; Thu, 19 Jan 2017 10:47:12 -0800 (PST) X-Received: by 10.98.75.16 with SMTP id y16mr11857517pfa.23.1484851632277; Thu, 19 Jan 2017 10:47:12 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 134si4316027pgh.30.2017.01.19.10.47.12; Thu, 19 Jan 2017 10:47:12 -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 S1754212AbdASSrK (ORCPT + 9 others); Thu, 19 Jan 2017 13:47:10 -0500 Received: from mail-pf0-f180.google.com ([209.85.192.180]:36665 "EHLO mail-pf0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754283AbdASSrI (ORCPT ); Thu, 19 Jan 2017 13:47:08 -0500 Received: by mail-pf0-f180.google.com with SMTP id 189so15503366pfu.3 for ; Thu, 19 Jan 2017 10:46:51 -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=41d7Pg4HF/qT7pXWdrdyT69dtwSPttiU3GC9/4LI5Jg=; b=IDHZLAiXYYFshmdETHTemGeINM4G37kVeB28sW5jTEvWz5DHGk7VIMuUyfpsPRAW1/ 3QWIuOivJF5al6gZTOJHUxJWE6Gh3j9ejbe8QTgQY4Te8JsmErAO/lvuEybDh4BEnRym 3ci2pdN3KyMXIxWDKXS3Nnwu5jRj5mi3yPg3Q= 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=41d7Pg4HF/qT7pXWdrdyT69dtwSPttiU3GC9/4LI5Jg=; b=czolEALMo3JUth9S/i8wjPQtK+Iqo5Wj/Ml4drnmyCQmFFmkwsDDQt1X0KxkSHjB1N pYgC5Bh3ZMC3/FQ2Tt6tBEippEr6g5EXLdVOQQ5Xkyr9rGkLCDHoYj4JZqe/liLlidCm rPSUnamRpArm8MbTkD7D3z3HXutT/34etbYqp5lmC42L52ED3j7WRuQ1RKCOgHAKv4GT zweohnelate4Rez0zwVIi6ELMp7sCjEsHGjcEmgTiS+cRaeoKZdmszPa9PTaWDwzEAxu 90wsvzXugUhH7jXJnXRUbC00bIp6KCdEFjuhXIlaFF33cDtQekdV0h8qAXHqkCEKjZc7 ItLg== X-Gm-Message-State: AIkVDXIGifpzcX4eD1w6qpvGyAPDrlCZ7d94byXaxd6NcxS4xdlhcsWTUI8gp760CLFxEP6i X-Received: by 10.98.63.15 with SMTP id m15mr11877558pfa.71.1484851610902; Thu, 19 Jan 2017 10:46:50 -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 w76sm10552990pfd.74.2017.01.19.10.46.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Jan 2017 10:46:49 -0800 (PST) From: Bjorn Andersson To: Kishon Vijay Abraham I Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Subhash Jadavani , Vivek Gautam Subject: [PATCH 2/4] phy: qcom-ufs: Correct usage of regulator_get() Date: Thu, 19 Jan 2017 02:47:37 -0800 Message-Id: <20170119104739.4376-2-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170119104739.4376-1-bjorn.andersson@linaro.org> References: <20170119104739.4376-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 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. Cc: Subhash Jadavani Cc: Vivek Gautam Signed-off-by: Bjorn Andersson --- drivers/phy/phy-qcom-ufs.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 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 Reviewed-by: Vivek Gautam Reviewed-by: Subhash Jadavani 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 Thu Jan 19 10:47:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 92021 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp422334qgi; Thu, 19 Jan 2017 10:47:58 -0800 (PST) X-Received: by 10.84.232.204 with SMTP id x12mr15572181plm.125.1484851678482; Thu, 19 Jan 2017 10:47:58 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e19si4324744pfl.42.2017.01.19.10.47.58; Thu, 19 Jan 2017 10:47:58 -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 S1754427AbdASSrv (ORCPT + 25 others); Thu, 19 Jan 2017 13:47:51 -0500 Received: from mail-pf0-f182.google.com ([209.85.192.182]:33711 "EHLO mail-pf0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754310AbdASSrI (ORCPT ); Thu, 19 Jan 2017 13:47:08 -0500 Received: by mail-pf0-f182.google.com with SMTP id y143so15510199pfb.0 for ; Thu, 19 Jan 2017 10:46:53 -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=vTRphKaaDWVxeBSaOVCWmphVhouY6v/JKeftq4vx4Xs=; b=iP23a6odnQ7qUHP9HW1DcYOHT9u8gRi9JFIvioBLZXsfBKgEG2xGEzOU8k4w581CK2 pN2YYjZTltGXiTbOUgI/gL3c+iLPJYWPDQsFCVCtv+O61xmC1/V++cq8hAtbwtrJAw+H Bg7TEkJ/q3GbyFIFdfn3n72+a6kvxyQPJw3OI= 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=vTRphKaaDWVxeBSaOVCWmphVhouY6v/JKeftq4vx4Xs=; b=MC8HjTczTePb9vuxwRPlzTlkQtWMpg9DjnAbQ/aYa9trGx08Z5TtVS8U6rDASQ1v9x Ikb9vNlFHGDQ8CmJSragBc2EWakjsMNmkYrAwOoCMEROW3lr0kY/3tVAY1Y7kN064sL3 SAlVg5K7bGbYEiKZbKz/WX8fsRIY7v8/aLslty0D14iZ8VzR5Ig9cvgzBLcNfX9Ux5wD lxJpuQT/M2/HLMl9gCmMfJrrgQCDHagFe1XjxaQjWnuQnWmC+W5Vhda4lIXooKpj1H2d KHmrDR/UNnUtEQpqGWcOIO4kYzgsqDU645qOMzT+TeflVEobOMMdf3vp+uTyNoQzTKRF MQoA== X-Gm-Message-State: AIkVDXLCcXBmOUupU5E27cvY8xHaG7YRp1XTN/zL1Ob9g2E7HkovsFaMwa86mSKYJGk+PHXB X-Received: by 10.98.223.195 with SMTP id d64mr11803073pfl.80.1484851612623; Thu, 19 Jan 2017 10:46:52 -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 w76sm10552990pfd.74.2017.01.19.10.46.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Jan 2017 10:46:51 -0800 (PST) From: Bjorn Andersson To: Kishon Vijay Abraham I Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Rob Herring , Mark Rutland , devicetree@vger.kernel.org, Subhash Jadavani , Vivek Gautam Subject: [PATCH 3/4] phy: qcom-ufs: Remove -always-on property Date: Thu, 19 Jan 2017 02:47:38 -0800 Message-Id: <20170119104739.4376-3-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170119104739.4376-1-bjorn.andersson@linaro.org> References: <20170119104739.4376-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. Cc: Subhash Jadavani Cc: Vivek Gautam Signed-off-by: Bjorn Andersson --- 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 Reviewed-by: Subhash Jadavani 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 Thu Jan 19 10:47:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 92020 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp422288qgi; Thu, 19 Jan 2017 10:47:52 -0800 (PST) X-Received: by 10.98.13.203 with SMTP id 72mr11686905pfn.64.1484851672342; Thu, 19 Jan 2017 10:47:52 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h1si4327585plh.3.2017.01.19.10.47.52; Thu, 19 Jan 2017 10:47:52 -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 S932101AbdASSrv (ORCPT + 9 others); Thu, 19 Jan 2017 13:47:51 -0500 Received: from mail-pf0-f171.google.com ([209.85.192.171]:33715 "EHLO mail-pf0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754374AbdASSrI (ORCPT ); Thu, 19 Jan 2017 13:47:08 -0500 Received: by mail-pf0-f171.google.com with SMTP id y143so15510379pfb.0 for ; Thu, 19 Jan 2017 10:46: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:in-reply-to:references; bh=81HZ8oefrIcAyzu3IOjjjFMjGbsECJIP+xl0StNrWoE=; b=VcbP6xAdVJaiWJy7RmapTlbl7AlwjcV8lHvxVUTCR8LTJ29bj39oOL4IM1VvvtcJQZ vAwDx7PZpFyoEj0PdspWZm4u3fBEZ6pbqlZuMGlW8npyRMOAdFLigLdJUCpJrUxUTp6A onk5B4kV93ONtnnle0ETlCjib5M4pX8nKWHAM= 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=81HZ8oefrIcAyzu3IOjjjFMjGbsECJIP+xl0StNrWoE=; b=ZbRqU0ORawD0ApZfuq0vBshkZ7B6k30tP9W487kNAuKWpIiyq8WPHuBbiN9hhUDlpK j76uCdE5T0u2AYU41c6gORhwVOs6YN6JRqzFO2dGrli8hHJhXGknPXvJXVFK39dOT9Us IpFax+2qX3QTNhmNdhLvsVCsf8EECZu7wghBhfAuaGXy2YawB5sfHJFj64fEf1S16trY wMhiOKSb3r/KXlkN1EiVvfOgpPpGEoxcAXSQWYg0naaQOIgvv2ABAVFJcRSWpHnhwExM UzO5Xv0tJKowPlAtVdwByOv0eBY+uMXt8zhd2Fgp6z5HGx3RDBQPDHeZBJ+jUvQlyOqu bkZA== X-Gm-Message-State: AIkVDXICgwevLbz5dOXT61Y32pUJy7oBtlCHv5vSjkyLDSXZup6KnixZb+g712qZB7cyqb+F X-Received: by 10.99.153.26 with SMTP id d26mr12213803pge.44.1484851614312; Thu, 19 Jan 2017 10:46:54 -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 w76sm10552990pfd.74.2017.01.19.10.46.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Jan 2017 10:46:53 -0800 (PST) From: Bjorn Andersson To: Kishon Vijay Abraham I Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Subhash Jadavani , Vivek Gautam Subject: [PATCH 4/4] phy: qcom-ufs: Suppress extraneous logging Date: Thu, 19 Jan 2017 02:47:39 -0800 Message-Id: <20170119104739.4376-4-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170119104739.4376-1-bjorn.andersson@linaro.org> References: <20170119104739.4376-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. Cc: Subhash Jadavani Cc: Vivek Gautam Signed-off-by: Bjorn Andersson --- 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 Reviewed-by: Vivek Gautam 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);