Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2496004pxu; Mon, 7 Dec 2020 08:04:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJz66t67SkJfBRDTeyd+0gAwADgc6C5Nyyt4BK6E7+j1rHZljYiKnNFaMejjL1dSsGQAFWSv X-Received: by 2002:a17:906:4a4f:: with SMTP id a15mr10963773ejv.541.1607357058136; Mon, 07 Dec 2020 08:04:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607357058; cv=none; d=google.com; s=arc-20160816; b=LG55qLKNdE//BSqyq2ICKw7ARPESx1+3/CFtBFFKSSAo29tr3262vVu9JENe+RKOyb d+Qu0BDqCsRGPGT9HOvsi89svOzGsCVZ8BFj4alKFcLWz2iZBt/DPVN4g7MfRecsvbTm n7VQdoymAWkIcHTNfvwmBuBxg1zphsfkcAkhh+nfeEYomWsS+tP5Z4/6v/nlXKzDxy70 1liKc374dsYPFl3Gu4rawMIOrKGZqtxBhXMzXVCvlGaWmoKDJznN/m1KMVr2UIJr2Dw3 f0uUMnxemG9r6Se7dzQuDHL8F3eSi6mRLpGhDZkQD7ndU7xBT9sLPDTGYiKFyP+l0i18 FWOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=TsbR/ygYxyXFNxTWS+rlq87PYRq6NOfsyxwkN1nkloE=; b=i5eW4GY+Pc9UKTFOsgQHNQLJ4UBNAEoFzKlDE0+Y/oMJzNPZFWVOyTfpr2A3ThCpbA WEuF6aJHcj+yFbZGpnI5YxCo02gU6lMxu37hpkKfPEV3ov1oII4Yb9w5z3yMuBhd6Lrb KoFJG+1rl4PG/t+vYC5FRaLc2eLKUJqRx/i1jIi6rDm6XQ3Y4FLRN32n8AVygo2rEL7T nrNTCU0uQLY7XWPlwWDlRBSpwXPVyq3WsQ+j9ppbdugZlf1S00aaBmrf0WDoHAn3RfCV hCiHNBh/afbO6ztbfI5G0L5W8bcWNn7Zw+4ybpAyeAFdK8cFqCZQrWkpBFRbk75SwqPr cDtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Bsbi60Ap; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b14si6213375edw.332.2020.12.07.08.03.51; Mon, 07 Dec 2020 08:04:18 -0800 (PST) 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=pass header.i=@linaro.org header.s=google header.b=Bsbi60Ap; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726487AbgLGQAG (ORCPT + 99 others); Mon, 7 Dec 2020 11:00:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725814AbgLGQAG (ORCPT ); Mon, 7 Dec 2020 11:00:06 -0500 Received: from mail-wr1-x444.google.com (mail-wr1-x444.google.com [IPv6:2a00:1450:4864:20::444]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4641C061794 for ; Mon, 7 Dec 2020 07:59:25 -0800 (PST) Received: by mail-wr1-x444.google.com with SMTP id l9so4116001wrt.13 for ; Mon, 07 Dec 2020 07:59:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=TsbR/ygYxyXFNxTWS+rlq87PYRq6NOfsyxwkN1nkloE=; b=Bsbi60AptI1vCJOxzvRvBbaEKPAazGs9IEdCxKhzFzQREOIMVOxK/5D4TcbhHl968t gmU7bHFSKllntii/SUXLSDINSRLe9zYtzjuqy8kMXaxCarhOunVii2BEwuBUbfpJLg3l ni/IaIbbbofOVXhCPSyK6RDKyoD5EZ/9n4nEtinLJE94xlg+0UCfpNoNJFHp+lSJJyrl mY0ptoOYtLWZzA8LjxvxeeshAPcGFcUggO9W9Vp+7tJruGyHafRFbxADiuh3FXS/ksyr jvzB1gi53Bk8J9U93Qb9S4JomZTrgXGsB0DKpkvQv+8yfcTXH822m7KMH9p8ByG/+aM1 XoXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=TsbR/ygYxyXFNxTWS+rlq87PYRq6NOfsyxwkN1nkloE=; b=atdiFs9dUlf0DVbY3FU+NU9vuPTcDaQPUwY5MbLYSJOpuX15qj3rI4Nzc1QW9N4/pM 4pELVTbttvjzKeIuMIVOSucLSo95EW5Qq3RipEjhlu1qlF5YDB/TzDuFctE++V1JlmLk W5dCsdtzEQzC1xJ2G3dyPGgrZTD3A6BRCL4Bt+rlbt67p31pHrLtIJjdxPfO99MeoQRE Uuy+aXjR9BZdMAH0kWxH7Gvku+vZ6FcsESQDpfte1VortSzJwBipvQeBEz+sNk0WXhHv 1RBh2HPTd1bGgDA4P3er+ckFRuVRgxzlnpDmAjbwm3/PZGLuWoDhVY+MYMZAdQhzJ/Ix S4rg== X-Gm-Message-State: AOAM53121ySzXCUYB1DsS5Xqq671nQhf1MMqfAqklQzfGzr6Kgjbikud VazzURrA4/jROvikJM5EUIUPvU5Dx5yZ1Q== X-Received: by 2002:adf:f347:: with SMTP id e7mr20465446wrp.183.1607356764149; Mon, 07 Dec 2020 07:59:24 -0800 (PST) Received: from ?IPv6:2a01:e34:ed2f:f020:797d:a1c3:5539:208e? ([2a01:e34:ed2f:f020:797d:a1c3:5539:208e]) by smtp.googlemail.com with ESMTPSA id s63sm7041541wms.18.2020.12.07.07.59.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 07 Dec 2020 07:59:23 -0800 (PST) Subject: Re: [PATCH v2 2/2] platform/x86/drivers/acerhdf: Check the interval value when it is set To: Hans de Goede , =?UTF-8?Q?Peter_K=c3=a4stle?= , mgross@linux.intel.com Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org References: <20201203071738.2363701-2-daniel.lezcano@linaro.org> <20201203071738.2363701-1-daniel.lezcano@linaro.org> <92e330ff28a10b1fb92d91c083fa3cac@piie.net> <771a76da-bdd3-54b2-3661-e9db918ee00d@redhat.com> From: Daniel Lezcano Message-ID: Date: Mon, 7 Dec 2020 16:59:22 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <771a76da-bdd3-54b2-3661-e9db918ee00d@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/12/2020 15:54, Hans de Goede wrote: > Hi, > > On 12/4/20 12:43 PM, Daniel Lezcano wrote: >> On 03/12/2020 22:22, Peter Kästle wrote: >>> 3. Dezember 2020 08:17, "Daniel Lezcano" schrieb: >>> >>>> Currently the code checks the interval value when the temperature is >>>> read which is bad for two reasons: >>>> >>>> - checking and setting the interval in the get_temp callback is >>>> inaccurate and awful, that can be done when changing the value. >>>> >>>> - Changing the thermal zone structure internals is an abuse of the >>>> exported structure, moreover no lock is taken here. >>>> >>>> The goal of this patch is to solve the first item by using the 'set' >>>> function called when changing the interval. The check is done there >>>> and removed from the get_temp function. If the thermal zone was not >>>> initialized yet, the interval is not updated in this case as that will >>>> happen in the init function when registering the thermal zone device. >>> >>> Thanks for your effort. This improves the code, good finding. >>> >>> >>>> I don't have any hardware to test the changes. >>> >>> Tests successfully executed on my good old AOA110. >>> >>> >>>> Signed-off-by: Daniel Lezcano >>> >>> Acked-by: Peter Kaestle >> >> Thanks for testing the changes. >> >> Shall pick the patches through the thermal tree ? > > I can take them through the drivers/platform/x86 (pdx86) tree, > but if you prefer to take them upstream through the thermal tree, > then that is fine too... > > Here is my ack (as pdx86 maintainer) for taking them through > the thermal tree: > > Acked-by: Hans de Goede Thanks. I'll take them through the thermal tree. -- Daniel -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog