From patchwork Fri Sep 20 21:52:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 174157 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp3031643ill; Fri, 20 Sep 2019 14:52:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqxgF2RlNCugyzt8j5xWkYoQ/clSTE5F7JILs3C3LDF5F80GYUlhChws5iLlh085XeHvhPHK X-Received: by 2002:a05:6402:696:: with SMTP id f22mr22477023edy.216.1569016370169; Fri, 20 Sep 2019 14:52:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569016370; cv=none; d=google.com; s=arc-20160816; b=HKReDuiSISMciSBUbugJqH1NJ9FFIEkFNztwg4TIJNGfMAegovyuL417JBvNutVvRf davu5JrFzKer1CcddSXDng4wTX5LOM7BwsUaLxQpOEOIVKorNcBEYOolg+rxgYj7PT7f mIA/sE53gnLT++GnNMG3uUy1Tb520INDaKIKGlokKervIyBxJ1mMW9x8UsLqKNRK1iHE ZopJ27HGRKq7HuNqPJyCIvOzJpg4DsvbqDZJX66oopY8Kz8LOprkR0bsDW4USxUWVI1G 3JYP3CGWSK6i+Lnohm8LWChXOhAKEX7wgjaSW/qjviqzM9fHTZldLKqgFRStmQ9e/6AM X5YQ== 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=rgxAsmamrP/1FywMDc4JQzF0Q+u0H+PkQ5h0OpTIvkGn7yRejLDp3J4J20gli5ovZY yH3vlqCWHtFGsGb21+57NEvnAqvB1pTIkkHhiKKAP8T13Cn5bvoIUbp8BaibardKXrmy 30ZDoIdQqpprrcFlcwjXbLhsejPZakh9hbozPy2FKVuREdBViZl2FHFQgedgg/+eaJ3f 6unwxqra2/y86aSGDaJdzRdRLQJs1+DqHk0aH0W4KcEVF/d6dMyOC40xHgSGuhMgKMKT q2vjARimC2NtP4CO97hxUXVBfv9LcLjNL9hcqtrQ2AQ6IyggMWE3wI0fgUyJY8mse4KS hTAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=r+t6NZQ4; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 d17si2225527eda.213.2019.09.20.14.52.50; Fri, 20 Sep 2019 14:52:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-pm-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=r+t6NZQ4; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-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 S1727500AbfITVws (ORCPT + 11 others); Fri, 20 Sep 2019 17:52:48 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:36604 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727388AbfITVwr (ORCPT ); Fri, 20 Sep 2019 17:52:47 -0400 Received: by mail-pg1-f196.google.com with SMTP id h17so2027023pgb.3 for ; Fri, 20 Sep 2019 14:52:47 -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=r+t6NZQ4YCr3fX3XKm0sA+keyVNFZYkHuIoXQ1qZcmVHfcxF+mZCfCrEV7WaEMHvU6 ZpPYiz6N65E2lKZkGVlZT2tMfvvuD9reA4uDlvVXJsQ56iCvfS9mUXkf3hQF98FW6K9D 7C85yko7Ix+8mjJFLNXfXwtxTiK5hyDxJH1tnDa69ouo8MSkCedw2uDHWqjUsLu/j5qv 8Umx1z3Qam7igJcaOv95kEQgfH0QJfL1IiJbtM8gxHrgvCkwKpzb3Ne4uN+dDOd6Nzhy 8BjaDk98pAY+gYv5pKJxgLdqVdwGQ4E/CP337zXTilxWSS6sdxKuDLl5023hCvUXh1NU XkaQ== 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=B0Ldv12zRhir1EhkSgpbWnTfIPAXjmusFPISTiRM9pNwRYq1Ab3utuTx/yiB9puXpL IH3q1vwuE3apwaTYQKbznU1Ff3fnJ2YAgpWDH5EOxTChQALKdcE1zqkBW/J5yiO2rpZ6 ca7YepHecW/Si3UhO+cVu5cNrt7NTwKonIKozzn2V+diEH5Igz2SoFycaBBKf3jIbjm8 ln2DG0dyttgPVQu13RiS3MeWpOE950Zi+A6/cZFJaFfPF4cTrclt416HQ+fZzY5C75wX RnHr69IeyTKKIzuTOz+SvU0AW/Saq+c2Y7lHS96gP5pJWg8K7kYur/+tST/8/Wm9Feg5 Zt0Q== X-Gm-Message-State: APjAAAX4VDZbkZsISg5pcwTqKa09Bep6rL7cIHZ6vcGWhNGoPHWREfkB LXypmhnIqd92JmldcMbQwwztcA== X-Received: by 2002:a63:4e02:: with SMTP id c2mr1049906pgb.339.1569016367039; Fri, 20 Sep 2019 14:52:47 -0700 (PDT) Received: from localhost (wsip-98-175-107-49.sd.sd.cox.net. [98.175.107.49]) by smtp.gmail.com with ESMTPSA id f18sm2960808pgf.58.2019.09.20.14.52.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Sep 2019 14:52:46 -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 v4 03/15] drivers: thermal: tsens: Add __func__ identifier to debug statements Date: Fri, 20 Sep 2019 14:52:18 -0700 Message-Id: X-Mailer: git-send-email 2.17.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@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; } }