Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1449807rdh; Mon, 25 Sep 2023 13:11:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHikXMpjhWYg0R4MmWuDLi/eGLJlsBsg53PrkDrWis7w6sCzzx86YTyUjSKMH0G0P9nTWLB X-Received: by 2002:a17:902:e74a:b0:1bb:9c45:130f with SMTP id p10-20020a170902e74a00b001bb9c45130fmr9404861plf.69.1695672697469; Mon, 25 Sep 2023 13:11:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695672697; cv=none; d=google.com; s=arc-20160816; b=K++KSrYDj1Y8yev3kBQEU4NwUjh06boGGyMZAqx/J/gmnldiVNWQAO7DXzpT34Pu+s sRlZpIIc1l93MHg5qYTSjKhUZTPiZQD/bOooF0XVgl6cqI2g6znJgYNDRm5W3HbSPXbd POTWj4l755CANBKGpBqdOmwQSHzE3UM1yl7LGCFRMMu86IYOoCTMxnMr4qhp7CoL8W6s tFTB4ekoTkeHhcdNrNcPwtvL4RBBEjB08pIxx68jozWfjgyWxjU5ZBH9KEVlKD1I9wXn 8e3rnbp/Lg5x6a4AW0NK/1miR5MeakI+YScQCwNAhzOj44O+4IQxf37RoHYEPL5sFAAr 4ZPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=IIgn/nOIhhpdvgI/oulUOoeBBGmr0AoFDEV/z6/7fEw=; fh=3TYsFLL4TpbZ+4jkSFORJpVowAe4qwhqYbEZIwS//bQ=; b=nw5r8/T7a9BNnL2NKI9CKJs+NGkB+nDJYQX7fWLiSacyvpv80FOEdJta+9hca37I44 HQ7bEECLBIsAnxd/j/B28U4NdslwRRKBlcxsSekSHxa1D22FYPObhX2ZYfKtcNcRMV3g pyt3ZVR+YJO9/dFrpkM0mcGjO2FD+C83wQo9C0iMMyAuRHWMvcKmGqEhRhGf+u7gJfNW 9CJA2JewU7/6d+BlnjT8YDUWO97ub1xhipFxY7ZgXrI+UvOh+r6UttwgC0JkRNDBLWye sS00pBhQDOvW0YNH86/6bVMm4T7jfk7zY7Jf56fwEnzwZ6JehpcU8EkpFAFk5JiJocmI yr7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=ekA3onxV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id u18-20020a170903309200b001c3be32bc4dsi9963341plc.23.2023.09.25.13.11.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 13:11:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=ekA3onxV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 20694809D3C1; Mon, 25 Sep 2023 02:53:55 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229669AbjIYJx6 (ORCPT + 99 others); Mon, 25 Sep 2023 05:53:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbjIYJx5 (ORCPT ); Mon, 25 Sep 2023 05:53:57 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3ADAC2; Mon, 25 Sep 2023 02:53:51 -0700 (PDT) Received: from [192.168.1.100] (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id BED5866072FC; Mon, 25 Sep 2023 10:53:49 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1695635630; bh=9wVVMeW0iA/EuwP7KjcnyVlsmaFHBI4yGmfpP4XGrqQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=ekA3onxVHDOjI6teW7l8DaE4DjKhVBGp5ZrZX12NiDJnolL1QPg2FTgfcLh4Mz093 8/lHOJbMCjyOSTsLhO9J1nov9S4XvxxkC4q6Rsjx4LPOIQ/o/kykwJDM2rpmFEPLlH 3n3jnH42Gtq4JziLqIftQCqGM+QYWt/RJ5hTpbLLFf+kq4y0i1JRCdyeY5x3J4a+B0 1roPFVMO3DMZtIIe+FUsAd6R0hssXtuQ0Jzbd4fzk8e0nZUOKQh0mGGoiyyd1p8j1z IIPec14m4/WOFNmBKwIAZv/LvG/ijI423E175z7Hg9pLlKewOZO+1y/l0Tp6ZpwQdm SZPr1dL/axotA== Message-ID: <9fd97bac-d180-14bc-09ce-878575f0cef7@collabora.com> Date: Mon, 25 Sep 2023 11:53:47 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Subject: Re: [PATCH] thermal: core: Check correct temperature for thermal trip notification Content-Language: en-US To: =?UTF-8?B?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , "Rafael J . Wysocki" , Daniel Lezcano Cc: kernel@collabora.com, Amit Kucheria , Zhang Rui , linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org References: <20230922192724.295129-1-nfraprado@collabora.com> From: AngeloGioacchino Del Regno In-Reply-To: <20230922192724.295129-1-nfraprado@collabora.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 25 Sep 2023 02:53:55 -0700 (PDT) Il 22/09/23 21:27, NĂ­colas F. R. A. Prado ha scritto: > The thermal trip down notification should be triggered when the > temperature goes below the trip temperature minus the hysteresis. But > while the temperature is correctly checked against that, the last > temperature is instead compared against the trip point temperature. The > end result is that the notification won't always be triggered, only when > the temperature happens to drop quick enough so that the last > temperature was still above the trip point temperature. > > Fix the incorrect check. > > Fixes: 55cdf0a283b8 ("thermal: core: Add notifications call in the framework") > Signed-off-by: NĂ­colas F. R. A. Prado > Reviewed-by: AngeloGioacchino Del Regno