From mboxrd@z Thu Jan 1 00:00:00 1970 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 D15B3ECAAD4 for ; Mon, 29 Aug 2022 12:37:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230096AbiH2MhV (ORCPT ); Mon, 29 Aug 2022 08:37:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229898AbiH2Mgz (ORCPT ); Mon, 29 Aug 2022 08:36:55 -0400 Received: from sonic302-24.consmr.mail.ne1.yahoo.com (sonic302-24.consmr.mail.ne1.yahoo.com [66.163.186.150]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99F917436F for ; Mon, 29 Aug 2022 05:20:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=att.net; s=s1024; t=1661775621; bh=FzJ4m4M3w53N7NQdJusfo1VfYGPaC+jsrMKVyE2Cxow=; h=Date:From:Subject:To:Cc:In-Reply-To:References:From:Subject:Reply-To; b=k6ixTCTgmcH5kzoQx4PHGgJ8Dgx4buwrfpX/oKmtFFDdjg28Woux0NgRx2NTKf0Bw/D7s3P9w+rXvt2cM8oK4+dqHzRb2I4lLZXiBVQRDvbStp/aViB94wRvsByRUBdAyL7Z6Ozz85tRFqWQtrNJ16bZdbaOco+AoHYPKYhIWI0= X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1661775621; bh=zCVcVuhE/UyhuZQsAwCHlxvG1zZP3IrA1z2QKCElrxm=; h=X-Sonic-MF:Date:From:Subject:To:From:Subject; b=ZtLbG7vRU5yqhDYWObUcNHXQ+Zzf+VViUnD/Ku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XfNpQ3XwhcoTpfNUZUQE8P6_hgA__6CUIR9HQORNZIBztDZpoxyk8cMvY JsN4sczyYYDU1usfyknF1VEcZS.zpKcJ58MCVjt7FK4lx.KbmJ1M1yns1inH227ePLxDcoiGJ4bX tv6V7.ple9Nr2rjqKeMrVo6uiz8ftWbsILM6bc.yMULWtexQo9ny1d5hRf0vNVyffM6JOYYM24tS GAVgA3Wf47Zz.g2UNk6HWflJr6sk1U6i1JoxTK8Qsox4QAXKprS.hUGSUdPbdGZkXUHgcXpxmert HqA2oC14TfPfdRjYDy.VWrNm_uYc9kpyeHV9Y6Yx20aEpnuyj4uJv01YlTf6ESgROW31rNEpsm2Y 14ckgHFk.mxLuZkjv6fWSPXb.mkNoK9hVt6DMXfWnbG33VnsYv86wJer4g5ZEcZvhCpjVmskkEim fjDTuOO33WCHHgPodw07WyNW2 X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic302.consmr.mail.ne1.yahoo.com with HTTP; Mon, 29 Aug 2022 12:20:21 +0000 Received: by hermes--production-gq1-686964ccb6-z2kdz (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 0b31fffa8eb0473f83fde84cab2d06af; Mon, 29 Aug 2022 12:20:17 +0000 (UTC) Date: Mon, 29 Aug 2022 08:20:09 -0400 From: Steven J Abner Subject: Re: thermal driver patch To: Randy Dunlap Cc: linux-kernel@vger.kernel.org Message-Id: In-Reply-To: <0f961ea6-4948-0b7a-e01d-d62ca4065af8@infradead.org> References: <0f961ea6-4948-0b7a-e01d-d62ca4065af8@infradead.org> X-Mailer: geary/3.36.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 29, 2022 at 05:47, Randy Dunlap wrote: > a. the exact message(s) [copy-paste] > c. what kernel version is causing the problem [ 0.000000] Linux version 5.18.12-051812-generic (kernel@sita) (gcc (Ubuntu 11.3.0-4ubuntu1) 11.3.0, GNU ld (GNU Binutils for Ubuntu) 2.38.50.20220629) #202207150942 SMP PREEMPT_DYNAMIC Fri Jul 15 10:10:55 UTC 2022 [ 5.244369] thermal thermal_zone0: failed to read out thermal zone (-61) [ 0.000000] Linux version 5.4.204-0504204-generic (kernel@kathleen) (gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)) #202207071639 SMP Thu Jul 7 16:59:09 UTC 2022 [ 5.207243] thermal thermal_zone0: failed to read out thermal zone (-61) as to reproduce, can only think of saying: boot up kernel without patched? additional info that may? help: I did not trace what calls 'update_temperature', just saw any call to it will cause message due to it's call to 'thermal_zone_get_temp', which states no thermal_zone_device should provide or be requesting an update. It may be that if 'thermal_zone_get_temp' where removed was actual function's intent, and all instances in this file and other function's use was a case of designer debugging or signaling a deprecated API? That was my intent on saying 'for you to do and review', because it looked like a lot of functions could be updated to take into account that no device should call functions that start off by calling 'thermal_zone_get_temp'. It is more probable that my patch suggestion is wrong and calls to 'update_temperature' are suppose to fail with return -ENODEV always allowing other calls to 'update_temperature' to fail also. With proposed code, I've not seen adverse side effects. It just removed dmesg error, but was hoping I would get lucky and it was the reason for CPUTIN -62C without actually hard work of finding real reason. additional dmesg info: only other 'thermal' are 'thermal_sys' loading governors smpboot: CPU0: AMD Ryzen 5 2400G with Radeon Vega Graphics (family: 0x17, model: 0x11, stepping: 0x0) from lspci: Kernel driver in use: k10temp from lsmod: nct6775 hwmon_vid these 2 removed in personal configs, but used in the two ubuntu kernel builds: wmi wmi_bmof Steve