Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1556076ybh; Mon, 20 Jul 2020 00:58:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzEDV37ao8f87cNHk2WzEbZArZkgq/HmxM/bWjicu9bsE4SeM/dyAnWdfxC4PTQTMJ5ln+ X-Received: by 2002:aa7:d3c8:: with SMTP id o8mr20434312edr.294.1595231924862; Mon, 20 Jul 2020 00:58:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595231924; cv=none; d=google.com; s=arc-20160816; b=nBnEl7MZGfORHy1pEwxOyvu9g5DbiqvwOHTfl79KJfUio5dHvl1m9lBWNRqX9bBnUA 4kipUaIlA2OTCjYES2h2eQ+hA0nq+QcqmBlmXfAi81Xy8+/5vWUjS2qzfRDUiajMqt6/ 1d9u3rTJzPiDK5Z80aWAWMLkw0rCwU9V5eIjkrYdHapOSZtny4iQn2+UZwoiOjHznhe9 MZ/pnhW7SInJw6BoEgonFm9gAfcjxpOwZ4VtfNacMiEviLEv8EagtJB3N99nkWtO6pKI +jE4c5LeRfinmbkIIuHflRX5ClCeO/lsoR36a7wQGXf38mxOiFdNHnUaTY0xsv9i9H4Y UmaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature:ai-spam-status:dkim-signature; bh=Icy5Iucyg22mKJXSBVdoLZVWzcpOeTQq1+cgt1P3EEE=; b=BySVL2XUO75oXLRH909nU0u9QA3PEWbA4qXmj5AIHp+7TKcfjU0aDjc5CpYtnSMuY8 1PMjk6C6BHID88oI2oNbFdy7rtvbugKvbef61GR9c1RxVMxTE+SCIiL4le8d4T482mp9 A+wrskPMWWJ4T6rlNltD0959WvYY+xqgW0J1ZPvlFTv9aJmUTvnySEXEIX1yAqiNAsog VSzoNTLNoiBSo3BRyJ66sBUmKqNy15Yx66dQ4dR4LtEARDzJ6lPqXhsunY22dg7EuOOn Jif2fzaXKrxeqlxus34LQIzLulBRzSDhojBxeT/EsNbU+6gfoUteeAXWTMTCiqYkNdyV 1z9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mymailcheap.com header.s=default header.b=B2Eh2bjm; dkim=fail header.i=@aosc.io header.s=default header.b=SwXXCHi4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s23si11980821edi.7.2020.07.20.00.58.22; Mon, 20 Jul 2020 00:58:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@mymailcheap.com header.s=default header.b=B2Eh2bjm; dkim=fail header.i=@aosc.io header.s=default header.b=SwXXCHi4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726916AbgGTH4D (ORCPT + 99 others); Mon, 20 Jul 2020 03:56:03 -0400 Received: from relay5.mymailcheap.com ([159.100.241.64]:56940 "EHLO relay5.mymailcheap.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726015AbgGTH4C (ORCPT ); Mon, 20 Jul 2020 03:56:02 -0400 Received: from relay3.mymailcheap.com (relay3.mymailcheap.com [217.182.119.157]) by relay5.mymailcheap.com (Postfix) with ESMTPS id 564BE200EA; Mon, 20 Jul 2020 07:55:59 +0000 (UTC) Received: from filter2.mymailcheap.com (filter2.mymailcheap.com [91.134.140.82]) by relay3.mymailcheap.com (Postfix) with ESMTPS id B9DA83F15F; Mon, 20 Jul 2020 09:55:57 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by filter2.mymailcheap.com (Postfix) with ESMTP id 967742A8B1; Mon, 20 Jul 2020 09:55:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mymailcheap.com; s=default; t=1595231757; bh=JDIzmC6xzWVV+edmzQ2cj84tjI5FaofU5GCv/dpHT/U=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=B2Eh2bjm0yxlT86fQf4ccOV63/dFBj3EfHSM8yVkHRDetMG7XTzId7/frV3RpS5wL ltyTOQHmfkPylDTYID8gPaoAIQhe3yC16nCBNIiApdVORaGqy0FcrL68hUNsBCHCxS 5281KtsS8tH1dE/WJys0jijhML5JhvQx5JXH1oIo= X-Virus-Scanned: Debian amavisd-new at filter2.mymailcheap.com Received: from filter2.mymailcheap.com ([127.0.0.1]) by localhost (filter2.mymailcheap.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SY47Ma7yVLDD; Mon, 20 Jul 2020 09:55:56 +0200 (CEST) Received: from mail20.mymailcheap.com (mail20.mymailcheap.com [51.83.111.147]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by filter2.mymailcheap.com (Postfix) with ESMTPS; Mon, 20 Jul 2020 09:55:56 +0200 (CEST) Received: from [213.133.102.83] (ml.mymailcheap.com [213.133.102.83]) by mail20.mymailcheap.com (Postfix) with ESMTP id 413BD40143; Mon, 20 Jul 2020 07:55:55 +0000 (UTC) Authentication-Results: mail20.mymailcheap.com; dkim=pass (1024-bit key; unprotected) header.d=aosc.io header.i=@aosc.io header.b="SwXXCHi4"; dkim-atps=neutral AI-Spam-Status: Not processed Received: from ice-e5v2.local (unknown [59.41.162.238]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail20.mymailcheap.com (Postfix) with ESMTPSA id 51ADD40143; Mon, 20 Jul 2020 07:55:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=aosc.io; s=default; t=1595231735; bh=JDIzmC6xzWVV+edmzQ2cj84tjI5FaofU5GCv/dpHT/U=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=SwXXCHi44C7Qrhq27xC5WSDidT3TJJzjZl2oG9Z5x3CyoYh1Li9OQGTk5+w589zcF KjsiQ/wJ/84ankootRmH7ZtsJKfrKp9J9DD7YR7VYZ9BqG3IgS0acWqxiAm9nGRPEx DDiWjuk8lwi4hKGkn9nsdnLYAClk8R5m3RYf5u7U= Message-ID: <86689f81367716e3f88ec363edd0d302deca0a1f.camel@aosc.io> Subject: Re: [PATCH] thermal: sun8i: Be loud when probe fails From: Icenowy Zheng To: Russell King - ARM Linux admin , Ondrej Jirman Cc: Amit Kucheria , "open list:ALLWINNER THERMAL DRIVER" , Yangtao Li , Daniel Lezcano , open list , Maxime Ripard , Vasily Khoruzhick , linux-sunxi@googlegroups.com, Zhang Rui , Chen-Yu Tsai , "moderated list:ARM/Allwinner sunXi SoC support" Date: Mon, 20 Jul 2020 15:55:26 +0800 In-Reply-To: <20200708110301.GB1551@shell.armlinux.org.uk> References: <20200708105527.868987-1-megous@megous.com> <20200708110301.GB1551@shell.armlinux.org.uk> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 413BD40143 X-Spamd-Result: default: False [1.40 / 10.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(0.00)[aosc.io:s=default]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[aosc.io]; R_SPF_SOFTFAIL(0.00)[~all]; HFILTER_HELO_BAREIP(3.00)[213.133.102.83,1]; ML_SERVERS(-3.10)[213.133.102.83]; DKIM_TRACE(0.00)[aosc.io:+]; RCPT_COUNT_TWELVE(0.00)[13]; RCVD_IN_DNSWL_NONE(0.00)[213.133.102.83:from]; RECEIVED_SPAMHAUS_PBL(0.00)[59.41.162.238:received]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:213.133.96.0/19, country:DE]; FREEMAIL_CC(0.00)[verdurent.com,vger.kernel.org,gmail.com,linaro.org,kernel.org,googlegroups.com,intel.com,csie.org,lists.infradead.org]; SUSPICIOUS_RECIPS(1.50)[]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Server: mail20.mymailcheap.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2020-07-08星期三的 12:03 +0100,Russell King - ARM Linux admin写道: > On Wed, Jul 08, 2020 at 12:55:27PM +0200, Ondrej Jirman wrote: > > I noticed several mobile Linux distributions failing to enable the > > thermal regulation correctly, because the kernel is silent > > when thermal driver fails to probe. Add enough error reporting > > to debug issues and warn users in case thermal sensor is failing > > to probe. > > > > Failing to notify users means, that SoC can easily overheat under > > load. > > > > Signed-off-by: Ondrej Jirman > > --- > > drivers/thermal/sun8i_thermal.c | 55 ++++++++++++++++++++++++++--- > > ---- > > 1 file changed, 43 insertions(+), 12 deletions(-) > > > > diff --git a/drivers/thermal/sun8i_thermal.c > > b/drivers/thermal/sun8i_thermal.c > > index 74d73be16496..9065e79ae743 100644 > > --- a/drivers/thermal/sun8i_thermal.c > > +++ b/drivers/thermal/sun8i_thermal.c > > @@ -287,8 +287,12 @@ static int sun8i_ths_calibrate(struct > > ths_device *tmdev) > > > > calcell = devm_nvmem_cell_get(dev, "calibration"); > > if (IS_ERR(calcell)) { > > + dev_err(dev, "Failed to get calibration nvmem cell > > (%ld)\n", > > + PTR_ERR(calcell)); > > Consider using: > > dev_err(dev, "Failed to get calibration nvmem cell > (%pe)\n", > calcell); > > which means the kernel can print the symbolic errno value. Oh interesting format here. When we need to deal with a int return value, is it "%e"? Thanks >