From patchwork Wed Sep 11 07:16:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 173591 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp374207ilq; Wed, 11 Sep 2019 00:16:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqydBab9LZD/3dG8g/91hewd3gF5DE3UpZSMj6EZtYlFvMksJitqdNv7Igz+5Yul+gjOB99r X-Received: by 2002:a17:907:1048:: with SMTP id oy8mr28343471ejb.17.1568186214678; Wed, 11 Sep 2019 00:16:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568186214; cv=none; d=google.com; s=arc-20160816; b=QmAZ3neg61NvnpJHAovrz4QxR3QQW47qqWfpOTZlwSkUdO8+Y2O41xXvNIses8TdYA occ3Mt4h0wRQaZgWYwMzRocRqU8NiN9X9Rodc8m86yXYqJAL31xpbQhp7CAJpeCeXbOc IvYqMPZfr1lMRkR1xrls69bY8sxNnLUf013xxPucl1ndg8rCXbspMioDhoaeJ4pihgFw J0jO7vozvaCZXYCHJ2cvwaUOI1Np3/CKTNI15ElraZB5RjhfMXjZ6+k4zz8wIRjC/XP6 K4QSblbLB51VkUAKbjjQUiWwQaxpyg7QwVd7yTXNCXozY8ORH6BK9vGN08FFN03SIOWw c3HQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=4RhmNFrAjG8zCFd7O6KRoEzlzkP2xNrQ5XZHUG6WYMo=; b=QYrmJnpJDKZBtSC8OXnFSEZOLxHv6Ss7v8LgG9YxC5jrTwCZn1hgHP0GbmI2c3t1Ci lzxX2PMmPQSEmJjv8i/48gGLfvt4rW1lMUed5oNHgDOJ7s0demI6irg32nIgCIYXOOP8 gEqAHoanerMf+IfiGApXLFDWcgn1P92tPWlCrPQUB12RLp1Rk7B6WVk7fDFLMdSRkMQ3 ulF94T9eft8u5IW3CAxKLqMq3c+OOxI/8S8H418yCo6n2SuUawHk+lceANNA7Q6xZ7hi 6iW3n+bCrX3maoO0w85LXFo5QMp8P6f9tfefPYqx73T/5smT45/uQDgjJyQjy8U6v89q GAOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hfjY3QEN; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b33si11659121edc.265.2019.09.11.00.16.54; Wed, 11 Sep 2019 00:16:54 -0700 (PDT) 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=pass header.i=@linaro.org header.s=google header.b=hfjY3QEN; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727039AbfIKHQw (ORCPT + 15 others); Wed, 11 Sep 2019 03:16:52 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:40823 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726928AbfIKHQw (ORCPT ); Wed, 11 Sep 2019 03:16:52 -0400 Received: by mail-pl1-f196.google.com with SMTP id y10so9754980pll.7 for ; Wed, 11 Sep 2019 00:16:52 -0700 (PDT) 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 :in-reply-to:references; bh=4RhmNFrAjG8zCFd7O6KRoEzlzkP2xNrQ5XZHUG6WYMo=; b=hfjY3QENwOjtr0x1P9FLoxQ8HbWVvFtCTxs4dBSSCRszuxmG6vDUnB2snJ2wLMwaiy PxWA9K/x4lGty5FbGIw3uvXc0zFpQXNjZTAjjroE1ORwjN456I+yq/koVopZfVNXYMV9 GsPpNlQa3w92QLUg0IsVmNglJeczEIwAPjpIIJW+Qq/m41zd8tlIRetY4oxp2Duzhr+v 83QKhXI5MGAevWXXUE+nNqBOUbqTzzw54fjbAm+bXGv78Enxem3zqEizWqaid5Tq1alq AJhuUssClO1jk+CYY2EUuMGVxe0U9K3u2LUUn3sXVYhoi1HF1iNz5GpA7jqmkxfZDn92 CgTQ== 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:in-reply-to:references; bh=4RhmNFrAjG8zCFd7O6KRoEzlzkP2xNrQ5XZHUG6WYMo=; b=f7oLkcR3WG6xL/a0rFWZQ8yxAGU6NSzmGH7GAOf0raweYdw3OWQy9P5CGsvHsT+kvb NLcJWFtxk0DNYVK4ZEJ/gR6qFuZEoS2QiCcDlZJq/GP5U9ui3TnFnx8Hbr5AF1C8rcM4 obttTHi6GWfyvXbA6qjD6HIp2I5SIYhTwwH9bfz8cpQEaurDhvJ1LP9y+IVwp8n5rC/b LIEElgu4j/YVOxiUSzLcOv3zj8gIznQvpn2ZnRfO5I4rcDsdxGMbJWs8/6PyhUmauoMW WxTfEGLy9HfjBM1GdNZdmyZ1Ujjw4ty4P2jIUhSYFmpEyBl9dM+AOBt7Gj0K7Za9pVnn u/9A== X-Gm-Message-State: APjAAAX7LBYUfRoJf/yXpmWOczolGdiCu3QrpDRg6WJvfaMvsRV6Ft+y HctNoP9QPXwATu6cleEQgqPCKw== X-Received: by 2002:a17:902:8f97:: with SMTP id z23mr19935097plo.299.1568186211616; Wed, 11 Sep 2019 00:16:51 -0700 (PDT) Received: from localhost ([49.248.201.118]) by smtp.gmail.com with ESMTPSA id a1sm19631901pgd.74.2019.09.11.00.16.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Sep 2019 00:16:50 -0700 (PDT) From: Amit Kucheria To: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, edubezval@gmail.com, agross@kernel.org, masneyb@onstation.org, swboyd@chromium.org, Daniel Lezcano , Mark Rutland , Rob Herring , Zhang Rui Cc: linux-pm@vger.kernel.org Subject: [PATCH v3 03/15] drivers: thermal: tsens: Add __func__ identifier to debug statements Date: Wed, 11 Sep 2019 12:46:20 +0530 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Printing the function name when enabling debugging makes logs easier to read. Signed-off-by: Amit Kucheria Reviewed-by: Stephen Boyd Reviewed-by: Daniel Lezcano --- drivers/thermal/qcom/tsens-common.c | 8 ++++---- drivers/thermal/qcom/tsens.c | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) -- 2.17.1 diff --git a/drivers/thermal/qcom/tsens-common.c b/drivers/thermal/qcom/tsens-common.c index c037bdf92c66..7437bfe196e5 100644 --- a/drivers/thermal/qcom/tsens-common.c +++ b/drivers/thermal/qcom/tsens-common.c @@ -42,8 +42,8 @@ void compute_intercept_slope(struct tsens_priv *priv, u32 *p1, for (i = 0; i < priv->num_sensors; i++) { dev_dbg(priv->dev, - "sensor%d - data_point1:%#x data_point2:%#x\n", - i, p1[i], p2[i]); + "%s: sensor%d - data_point1:%#x data_point2:%#x\n", + __func__, i, p1[i], p2[i]); priv->sensor[i].slope = SLOPE_DEFAULT; if (mode == TWO_PT_CALIB) { @@ -60,7 +60,7 @@ void compute_intercept_slope(struct tsens_priv *priv, u32 *p1, priv->sensor[i].offset = (p1[i] * SLOPE_FACTOR) - (CAL_DEGC_PT1 * priv->sensor[i].slope); - dev_dbg(priv->dev, "offset:%d\n", priv->sensor[i].offset); + dev_dbg(priv->dev, "%s: offset:%d\n", __func__, priv->sensor[i].offset); } } @@ -209,7 +209,7 @@ int __init init_common(struct tsens_priv *priv) if (ret) goto err_put_device; if (!enabled) { - dev_err(dev, "tsens device is not enabled\n"); + dev_err(dev, "%s: device not enabled\n", __func__); ret = -ENODEV; goto err_put_device; } diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c index 542a7f8c3d96..06c6bbd69a1a 100644 --- a/drivers/thermal/qcom/tsens.c +++ b/drivers/thermal/qcom/tsens.c @@ -127,7 +127,7 @@ static int tsens_probe(struct platform_device *pdev) of_property_read_u32(np, "#qcom,sensors", &num_sensors); if (num_sensors <= 0) { - dev_err(dev, "invalid number of sensors\n"); + dev_err(dev, "%s: invalid number of sensors\n", __func__); return -EINVAL; } @@ -156,7 +156,7 @@ static int tsens_probe(struct platform_device *pdev) ret = priv->ops->init(priv); if (ret < 0) { - dev_err(dev, "tsens init failed\n"); + dev_err(dev, "%s: init failed\n", __func__); return ret; } @@ -164,7 +164,7 @@ static int tsens_probe(struct platform_device *pdev) ret = priv->ops->calibrate(priv); if (ret < 0) { if (ret != -EPROBE_DEFER) - dev_err(dev, "tsens calibration failed\n"); + dev_err(dev, "%s: calibration failed\n", __func__); return ret; } }