From patchwork Wed May 25 15:12:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 12861373 X-Patchwork-Delegate: daniel.lezcano@linaro.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 83245C4332F for ; Wed, 25 May 2022 15:12:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231433AbiEYPMt (ORCPT ); Wed, 25 May 2022 11:12:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245170AbiEYPMb (ORCPT ); Wed, 25 May 2022 11:12:31 -0400 Received: from mail.zeus03.de (www.zeus03.de [194.117.254.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90F8DAFB09 for ; Wed, 25 May 2022 08:12:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=sang-engineering.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=k1; bh=wXdyuOARirN+3i RGTghL8/L7A4l+1eU1qZGAVV4qlX4=; b=Lqikdu5kQVp61DYmUg1rnRRDUueMV+ uIMDCwVuuTn5c/qDUhiz8liDvAkFnyQ3zgkYtbIkhcu7k80E2jAK7xq/YHpvTf15 3Yl8qBY9KF8s+Kjj/c5i44zT8D/uF4rxztde99W/HuTxzaQOj2oefHF6pTiR/mGz XqxbgKaF6HVrI= Received: (qmail 1644752 invoked from network); 25 May 2022 17:12:22 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 25 May 2022 17:12:22 +0200 X-UD-Smtp-Session: l3s3148p1@ekr9f9ffCiFZD++C From: Wolfram Sang To: linux-renesas-soc@vger.kernel.org Cc: Wolfram Sang , =?utf-8?q?Niklas_S?= =?utf-8?q?=C3=B6derlund?= , "Rafael J. Wysocki" , Daniel Lezcano , Amit Kucheria , Zhang Rui , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] thermal: rcar_gen3_thermal: improve logging during probe Date: Wed, 25 May 2022 17:12:16 +0200 Message-Id: <20220525151216.24133-2-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220525151216.24133-1-wsa+renesas@sang-engineering.com> References: <20220525151216.24133-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org When setting up a new board, a plain "Can't register thermal zone" didn't help me much because the thermal zones in DT were all fine. I just had a sensor entry too much in the parent TSC node. Reword the failure/success messages to contain the sensor number to make it easier to understand which sensor is affected. Example output now: rcar_gen3_thermal e6198000.thermal: Sensor 0: Trip points loaded: 1 rcar_gen3_thermal e6198000.thermal: Sensor 1: Trip points loaded: 1 rcar_gen3_thermal e6198000.thermal: Sensor 2: Trip points loaded: 1 rcar_gen3_thermal e6198000.thermal: Sensor 3: Can't register thermal zone Signed-off-by: Wolfram Sang Reviewed-by: Niklas Söderlund --- drivers/thermal/rcar_gen3_thermal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/rcar_gen3_thermal.c b/drivers/thermal/rcar_gen3_thermal.c index ccdf8a24ddc7..ca5558178374 100644 --- a/drivers/thermal/rcar_gen3_thermal.c +++ b/drivers/thermal/rcar_gen3_thermal.c @@ -511,7 +511,7 @@ static int rcar_gen3_thermal_probe(struct platform_device *pdev) zone = devm_thermal_zone_of_sensor_register(dev, i, tsc, &rcar_gen3_tz_of_ops); if (IS_ERR(zone)) { - dev_err(dev, "Can't register thermal zone\n"); + dev_err(dev, "Sensor %u: Can't register thermal zone\n", i); ret = PTR_ERR(zone); goto error_unregister; } @@ -533,7 +533,7 @@ static int rcar_gen3_thermal_probe(struct platform_device *pdev) if (ret < 0) goto error_unregister; - dev_info(dev, "TSC%u: Loaded %d trip points\n", i, ret); + dev_info(dev, "Sensor %u: Trip points loaded: %u\n", i, ret); } if (!priv->num_tscs) {