Received: by 2002:a05:7412:8598:b0:f9:33c2:5753 with SMTP id n24csp66420rdh; Mon, 18 Dec 2023 11:40:59 -0800 (PST) X-Google-Smtp-Source: AGHT+IF5sCQGdZU2oQJh89bmM41KpvbAoA9dk0/lMgNxlkhrem1gK0JB+ukK3rxCQkuvBgczLkXy X-Received: by 2002:ac8:5c01:0:b0:425:9382:6531 with SMTP id i1-20020ac85c01000000b0042593826531mr22415815qti.43.1702928459279; Mon, 18 Dec 2023 11:40:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702928459; cv=none; d=google.com; s=arc-20160816; b=SkeDIrcssv4nA3k0UkG7KQBLvQHi9M1QhvWWBuQnmAUu79iBT5luVFD9cbofgKoMZt YNjPJy5iiK/Cp/qqmOeqnAaMHhCImRX3OT42xHqvGTMe4L95m4MDmfWiHgbYdlzbn8C+ xIrABYedPitm5owR0MO4fZibqJszTYMGf8wBjYC/E540zLn9N8povUb9+z6xc4Y6F5H8 Qe+UxDbdKbO5MkADgzY8R21/ZFUeuu+oY4vG0+VX0OArXF53zKTtfqadhT2kpMPyfQ50 arTnxBHjdH/LCpF/hREAjDhlYhtBt8VDwEmyzXqIY/h2AJ30GN6g+Mtchkiz1LdHvlrN gQOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence; bh=fqCIyrV80aQe/xoEqMj06Wb1LCcYSvkWNPSdUnD3As8=; fh=hZuK6VLNbUDxApj7Adx/EL7gNwm29SXo8zrGt71F5dU=; b=sH/1GCFZbPdnYeGUMPVIjXI73dGPLsJiImstgtaYnXA+WHmD5MuZMdTP6jh4yjQlgm 7RrWk6X6Pf4lw5YPuJfxsfaqhfkpM65r47GfIV7Fr3L86fI3ncyH9PKVp0Y+0RQtHstH t9+ak3nly1176TuyIPjySNksQmi9awZtdB31glmhPbpCCs9rXIQnnfem5LVMXHCca1eV cJXeS5UaFqmQyxnDyceDtZDwW+//LM8a/F+CySu/7myenAR8DvrAYf60Joc+ShoqKETj 5kVja9qVcg6/3ZVaCSk+z357kF/Y08XZ8tokgCHz3TzGIVU/RngUBH8D7vm1eP1vIiQz EwkQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-4299-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4299-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id k13-20020ac8074d000000b00423e912f31dsi22776340qth.49.2023.12.18.11.40.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 11:40:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-4299-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-4299-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4299-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id E07541C2221D for ; Mon, 18 Dec 2023 19:40:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 10EDE7146B; Mon, 18 Dec 2023 19:40:51 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from mail-oo1-f48.google.com (mail-oo1-f48.google.com [209.85.161.48]) (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 4AE7F1E530; Mon, 18 Dec 2023 19:40:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oo1-f48.google.com with SMTP id 006d021491bc7-59158202d22so816588eaf.0; Mon, 18 Dec 2023 11:40:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702928448; x=1703533248; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fqCIyrV80aQe/xoEqMj06Wb1LCcYSvkWNPSdUnD3As8=; b=ISu3/3/LiXkAW/i7y7Rf0rBn1Lz/nDn0wjKxM5UJQJ/A0McbdeEBEi39thjqI+1BYs 4p611R5qSXFtGQCEp1s2Cr7GM0/tUJBlsdSMoIaKmWqlAAYdX1iVK3BtfRzh3a0lAPZN v9I6Vbbl2SWMiyBRMw17hVYlLcn0ZUmtV9wM3A1mbPkPm9KGT+QeGdHjzSXxVPhjJNpX oBkCDevJVdr0jE/hdUyZ4tgztmuWsitk4U+ZAiVVSAbefJbfL1FKyGVTVoiHnsd9dqsK qS0aWdOrHdo3NaAR6dJe0ardcHxL9b+nx95YH67yvtSCCCr5MmklbyCOVauox3OV5Unq O1hg== X-Gm-Message-State: AOJu0YwVIcz/ZVMbCctMJGfjiWOOemCUBaUOK8JXav4+cO4QCizhyCu5 feeNDgbn+XNbor4OnI4WDZFpKxQp6LSdGQuv0iM= X-Received: by 2002:a05:6820:2a18:b0:590:9027:7ab0 with SMTP id dr24-20020a0568202a1800b0059090277ab0mr24739293oob.0.1702928448299; Mon, 18 Dec 2023 11:40:48 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20231218-topic-thermaldbg-v1-1-451bcb723e1d@linaro.org> In-Reply-To: <20231218-topic-thermaldbg-v1-1-451bcb723e1d@linaro.org> From: "Rafael J. Wysocki" Date: Mon, 18 Dec 2023 20:40:37 +0100 Message-ID: Subject: Re: [PATCH] thermal: core: Print out thermal zone name on update_temperature error To: Konrad Dybcio Cc: "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Marijn Suijten , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Dmitry Baryshkov Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Dec 18, 2023 at 3:40=E2=80=AFPM Konrad Dybcio wrote: > > 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. s/name/type/ ? It looks like that's what you mean. First, the tz type is not its name (because there may be multiple zones of the same type) and it would be consistent with the first paragraph above. > > 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_cor= e.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_de= vice *tz) > if (ret) { > if (ret !=3D -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; > } > > > ---