Received: by 2002:a05:7412:a9a3:b0:f9:327e:43ab with SMTP id o35csp140053rdh; Mon, 18 Dec 2023 06:40:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IFxgayKMwnR0QFi6yVkzBpJbw8jSaxDPBBpc3yz29zrT+QkbL9qmCYrJ+yud+iDvDBNVM1g X-Received: by 2002:a19:6418:0:b0:50e:2238:f726 with SMTP id y24-20020a196418000000b0050e2238f726mr993487lfb.131.1702910421925; Mon, 18 Dec 2023 06:40:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702910421; cv=none; d=google.com; s=arc-20160816; b=PPBtK2k8uVRzlOk1Fs87MVRKkNH96uHtP7+8tAJrobHjZvAJkkaYJ9EU8FPfUjJJLh 01JopNBm73XklqQVdbEznwt8wE7/FzOutYmaGRFVozHc2+n6bbPHRgk3qKJZbMKzJ9V7 BbjVSSy3z9/5btLfy9gGKGLv5oHeejMS5RqtvzDzSCyeuIZOMaIDNhuQJPry0WFc7pcC wkae6zaFPb5sWmvpftEinpxcG+v+OkUSwHP+fnMDddlXJ+VZ0FXNa+W2DdmvjnJ1071O HO4KKug+AhWIn9lAVw41oZ7D3GCJPFjf9h2TL4bDGC0f7Bk1jAAHQGMb0MaNBDeK2NHB WD+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:message-id:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:subject:date :from:dkim-signature; bh=bQTHmPqAi3BiL6/SuUuJyEm6v6KImHr4PNYUjCrz2Do=; fh=QBuol0xYbg43WgnPLKHz2lvfn3a7zPI5RQKJIGtqQQI=; b=yRTuuFkWVqk8nJZjBRoaz991vHGyosgNXwZAPH7epFnr6Lgvs2dwAt3rx6TpgvlFWh QlrplAMggEZRvFCnhOBjEhrFKRpvggSM4DMeVs5MpYePuR6YmC97dp7fHD20rAsK9don r3kZN/hiOVwyoS04MJh2tb+nAwHsIeZ/g5N7RVC6LjHP3/Ax1ZQhvxuP9fpVMPBWJXkP ZcLb6MKCC7ao7djtdCWX46j1Ff8yEhV0J0zPN1BxFyGQHrdECU/W4xYl51ZDBTDJtKjZ zWYJDNYpT0L61WMKB1/RwidA3BFD1i9wLp7l6AFeHNbMfTrXbK90cVu3yJdXoMcWDRLl 7Hbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=o8S7Ru0T; spf=pass (google.com: domain of linux-kernel+bounces-3848-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3848-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id x14-20020a50d60e000000b005530e685ec1si1915582edi.665.2023.12.18.06.40.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 06:40:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-3848-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=o8S7Ru0T; spf=pass (google.com: domain of linux-kernel+bounces-3848-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-3848-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id A6F231F21285 for ; Mon, 18 Dec 2023 14:40:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 68F5E37864; Mon, 18 Dec 2023 14:40:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="o8S7Ru0T" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2C6761E52B for ; Mon, 18 Dec 2023 14:40:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-553046ea641so2326231a12.3 for ; Mon, 18 Dec 2023 06:40:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702910402; x=1703515202; darn=vger.kernel.org; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:from:to:cc:subject:date:message-id:reply-to; bh=bQTHmPqAi3BiL6/SuUuJyEm6v6KImHr4PNYUjCrz2Do=; b=o8S7Ru0TO0sOoJc4eHASjA7/NQDC/MG6s8TZpndgov9Y+waUpWvu+byzmaTaXLOOMS xgoPPyuUE4uLkM4F/m9EKfwrHABK62mkAvdeC0b+rsXQ/1xrVCwylKltOjE8AXEUdqVj ut18DPxyCCNLJEehmzIDRyDyww4QpzSN2oFbZh+fkSMcNoZ7G5VXBytNDQmSRMe/FKXO 8T6zKO7rFla4gx+GvaHpzsgu7oaC40KyfYJWiuJZPduKlP/fdZyYbxnadFuerNwSMT2Q E9tHyhP6p9Brv61LgTVZPceH2tUPT2Hf5z1XOIOclovbkTMq9rfd7RUdgXovPY0yzKBK XbFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702910402; x=1703515202; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=bQTHmPqAi3BiL6/SuUuJyEm6v6KImHr4PNYUjCrz2Do=; b=svR7nNCrz+9+vnWHlgxgEbc2BjvJnbHxwG+TYsx7K89poN0Dt6BnRi4nvxp48MvFHB Sxmu1whLsN3wGbPO1+3Fl611BFA2WIkVlYzwIX6l4f7GMvI9ImilS5L7zzw420WiUqgN qizyXclZ6nhl0qW8Qu3I5ZF19sZ1a1kY4MEgDWGZJxfPnoQw7+aPOWTq/j35fayLPm5Q /gSJ6Fw95PfayjCeOeKz1ViPPxa/s36ZQwN2kV1XwTOeI0jpRJWh903PIN8pbIF3u7b9 8qs3X7vQP6Lnx5hndEkPO/2b0JA0zsu24We01Hg14OuthVn9T3997/guSlXVhpZ3605A MoWA== X-Gm-Message-State: AOJu0YxRDH/tK2H699omGqvQS1MaMGMh1eKFmLoM23yLjlWVCxGrQZZE KZ0lCatE2msDsTce0O15fVWF6Q== X-Received: by 2002:a17:906:1f4d:b0:a19:a1ba:bae7 with SMTP id d13-20020a1709061f4d00b00a19a1babae7mr3766338ejk.141.1702910402457; Mon, 18 Dec 2023 06:40:02 -0800 (PST) Received: from [10.167.154.1] (178235179137.dynamic-4-waw-k-1-3-0.vectranet.pl. [178.235.179.137]) by smtp.gmail.com with ESMTPSA id o18-20020a17090611d200b00a2362ef4387sm654930eja.49.2023.12.18.06.40.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 06:40:02 -0800 (PST) From: Konrad Dybcio Date: Mon, 18 Dec 2023 15:40:00 +0100 Subject: [PATCH] thermal: core: Print out thermal zone name on update_temperature error Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20231218-topic-thermaldbg-v1-1-451bcb723e1d@linaro.org> X-B4-Tracking: v=1; b=H4sIAL9ZgGUC/x2NywrCMBAAf6Xs2UAejai/Ih426dosxLRsqgil/ +7icQaG2aGTMHW4DTsIfbjz0hTcaYBcsM1keFIGb31w3l3MtqyczVZIXlinNBuM12DtGOIYz6B Zwk4mCbZcNGzvWlWuQk/+/j/3x3H8AJUeitZ3AAAA To: "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba Cc: Marijn Suijten , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Dmitry Baryshkov , Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1702910400; l=1225; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=UU7uKTLN3epJ08kwExjhQmhXBD0r95XXPC6qw1eXEh4=; b=Q+80yXiJ0lRIuo9VrUzn28vbeGgMSh97SH+S/F1mpK+OYOMmKiVcZfD0RqeQlgjdcaarchEAE ydCTp+GOpjcBkEoRxIlKLtjUyc9Aqg37NWxIYBTeZHmiULKGfh7qFkg X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= Currently, we can encounter an error like this: thermal thermal_zone48: failed to read out thermal zone (-19) It's good to know that there's been an issue, but on some occasions (like the error happening in the middle of a platform crash), one may not be able to look up what kind of thermal zone that is. Add the TZ name to the error message in order to speed up debugging. Signed-off-by: Konrad Dybcio --- drivers/thermal/thermal_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 2415dc50c31d..a6ccf93eb34e 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -403,8 +403,8 @@ static void update_temperature(struct thermal_zone_device *tz) if (ret) { if (ret != -EAGAIN) dev_warn(&tz->device, - "failed to read out thermal zone (%d)\n", - ret); + "failed to read out thermal zone %s (%d)\n", + tz->type, ret); return; } --- base-commit: ceb2fe0d438644e1de06b9a6468a1fb8e2199c70 change-id: 20231218-topic-thermaldbg-a59300435456 Best regards, -- Konrad Dybcio