Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2755553rdh; Wed, 27 Sep 2023 11:38:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHWniwjJQ7sZ1QeBmPrLZPIVvz1LeZ79XY7GRB0/K+FQPl1VWlc492CWICr/5gAVDfsEsaE X-Received: by 2002:a05:6a00:24c3:b0:68a:5877:bfb1 with SMTP id d3-20020a056a0024c300b0068a5877bfb1mr3650932pfv.20.1695839932947; Wed, 27 Sep 2023 11:38:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695839932; cv=none; d=google.com; s=arc-20160816; b=R4tqwRwp6RA5MR070ZRUW2pdpi8GKmDfyOsnT0f7l861lqtexq3XXPtXPaF2pmEmtb r0vlNkmwewkdbQhfWZJom5rkTvNtsH/pQtQzFwX+NRz8t6WLpW5l3pLv5hCA99SH8Zc2 42ttvsR+YFOEzmVdGecGdTGVVGRgcv5PJfLQbV4HZCiqvKm171BUuqtl2FS8Ck6YHSnk P7IXOnE7/bLMRnA4MheUHEWO+R8MNwuJ9E6bLhramXoyY0VApje0cTlqJEAJWBS1CDcu byjP4xc1mdwV+lxwK83LKM1Qn8oo/IS51sQLUZTbXFFm4IT61Ph0ZP2zsTfLnI90B0Zw SH6w== 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=sngrgBmcc0SNVGKMiz3UxrHAAX6L7zKBd8TMIQEgu/I=; fh=m0X/oytArEKD7xVRclrxSIpAMz4vi1vBL7kL27q+HkI=; b=zKStX51eIJyIDpaJxBVhQBk7lAcX0bDpihHxw4y3ZtfFolzR6yEh/yKdqNk/R4GJiH 5RV5a7A14zsPju8fzEq8pSShA54RDPiPqbYqP/vkWr3yNKT+sT37Ddf+jw4jDjRLfru2 hjL1hqkFLzq/ojd/jkeUZ/bIsv3hkm9F1GWKG+OM5rgjTg+3Yo9wWu20k5FYrY3Oq8CQ qfher1ndzfDRVhVvpBe8Nk0rEjivJKcfIlSgSnBHKy25GDdrmX1K39TXoHnh7TgTSuqB Xz5+hL6L9rOCCB6rbzM0UYZerDYl+y6kCkrOE+BOExqrlhHvk+cmheqqPm2sGvlU1u9p qUXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WOgYVGT5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id cd19-20020a056a00421300b0068fb6fc3ff1si15878471pfb.209.2023.09.27.11.38.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 11:38:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WOgYVGT5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 011D9805F48C; Wed, 27 Sep 2023 07:56:59 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232248AbjI0O4s (ORCPT + 99 others); Wed, 27 Sep 2023 10:56:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232067AbjI0O4q (ORCPT ); Wed, 27 Sep 2023 10:56:46 -0400 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02667139 for ; Wed, 27 Sep 2023 07:56:45 -0700 (PDT) Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-313e742a787so7623068f8f.1 for ; Wed, 27 Sep 2023 07:56:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1695826603; x=1696431403; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=sngrgBmcc0SNVGKMiz3UxrHAAX6L7zKBd8TMIQEgu/I=; b=WOgYVGT5dOoRVhJF6Qn4HMadW3x8DLaZ95Ld0oVJzxMai+4yKPSVxdwYcKZxDxsZkM DwSxvgz0uAXEhguosm1qU8ElSAv7BdGhut5jxgE/rbR3hWrjJbyzrsoJqMw8RV9yZwFm s5HXirslZWY8eR1cy8Qf4sD8ZuyvFFU9ANrusjeZSkywUDR8EVnGsN+qX4f+e//hukss lVA0UJqPSconPT304216rYeiVZOd9nwgt09Auj+zlACCdJjKXJIp/LfDbcsAAssTcff3 Vjtrvet2MVzg5FZxHcjF3YFDg5JXajELiSHDWt5z5tHE2TfRnH5+vQ12vPHK08Dc9X5U Hkww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695826603; x=1696431403; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=sngrgBmcc0SNVGKMiz3UxrHAAX6L7zKBd8TMIQEgu/I=; b=JZC9xszicM4O4zxo7t/Ah+H4p1CSrhR7zXadWmcHB5OQqJwxeHUMt9PTEKvQhKzWmC yz1X6TI8ezZpbmOW0GRznNQ4mAZ5DoUcLCRrCLF2UXoeJv1fZ46vAD8bKWY9GDcSQP9V 974uO6oZcVW96Rq41SUOu8Ah3a2c2UBoLmLPETotiyZHawxePB2Vf4p+yJ9oPwprlOTS lDtWXvqYD8meYkqXAVvT6GjPzDneBIhctu5RfcpR2yhVimXIJeQGVKQXGUa7W8nbZjfs xde/8JNGa92fY374BYauwTwWgzR7GYFEh9eHWEK+H7f8YjildIFOiY0wcrRcBoRgWYGo qs5g== X-Gm-Message-State: AOJu0Yz8ATk7KySKSChGhA+Makn6VeiLaAv0uCZmYP9QspAuivb8e+HK E+OSf7d4dhqQJ4c90cOQv/S0nQ== X-Received: by 2002:adf:fe09:0:b0:323:30d0:5c4d with SMTP id n9-20020adffe09000000b0032330d05c4dmr4942698wrr.19.1695826603342; Wed, 27 Sep 2023 07:56:43 -0700 (PDT) Received: from ?IPV6:2a05:6e02:1041:c10:c49e:e1a5:3210:b8c0? ([2a05:6e02:1041:c10:c49e:e1a5:3210:b8c0]) by smtp.googlemail.com with ESMTPSA id r2-20020adfe682000000b0031ff89af0e4sm17283525wrm.99.2023.09.27.07.56.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 27 Sep 2023 07:56:42 -0700 (PDT) Message-ID: Date: Wed, 27 Sep 2023 16:56:41 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH v1 05/13] thermal: core: Store trip pointer in struct thermal_instance Content-Language: en-US To: "Rafael J. Wysocki" , Linux PM Cc: LKML , Linux ACPI , Srinivas Pandruvada , Zhang Rui , Lukasz Luba , "Rafael J. Wysocki" References: <1957441.PYKUYFuaPT@kreacher> <1977624.usQuhbGJ8B@kreacher> From: Daniel Lezcano In-Reply-To: <1977624.usQuhbGJ8B@kreacher> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email 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 (pete.vger.email [0.0.0.0]); Wed, 27 Sep 2023 07:56:59 -0700 (PDT) On 21/09/2023 19:52, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > Replace the integer trip number stored in struct thermal_instance with > a pointer to the relevant trip and adjust the code using the structure > in question accordingly. > > The main reason for making this change is to allow the trip point to > cooling device binding code more straightforward, as illustrated by > subsequent modifications of the ACPI thermal driver, but it also helps > to clarify the overall design and allows the governor code overhead to > be reduced (through subsequent modifications). > > The only case in which it adds complexity is trip_point_show() that > needs to walk the trips[] table to find the index of the given trip > point, but this is not a critical path and the interface that > trip_point_show() belongs to is problematic anyway (for instance, it > doesn't cover the case when the same cooling devices is associated > with multiple trip points). > > This is a preliminary change and the affected code will be refined by > a series of subsequent modifications of thermal governors, the core and > the ACPI thermal driver. > > The general functionality is not expected to be affected by this change. > > Signed-off-by: Rafael J. Wysocki > --- Reviewed-by: Daniel Lezcano -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog