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 F3C45E82CA2 for ; Wed, 27 Sep 2023 14:56:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232258AbjI0O4t (ORCPT ); Wed, 27 Sep 2023 10:56:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232054AbjI0O4s (ORCPT ); Wed, 27 Sep 2023 10:56:48 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0218612A for ; Wed, 27 Sep 2023 07:56:45 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-32003aae100so8458094f8f.0 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=j0wkTzvtLHM6WamlCmPWyMC6QghEHjRgGpkdQ2ghJS2nopNQj2jOeiSP57NZTi0gmO Z4nXrWqRoOCW+7czxoTqvc69q3yapEiLnM7QJymRXI04lBRjDTpIOcrq3jUwYl72MCCd 12KvrL3iE0Ckdphc5JUUmCRGx228p/U4dVJDSmHrCVilIWBtdqqyt9iIGSb1vjdJt6Tn Zs+oKy3ngfpPgcaKVT33xdyBBd9zJOIX7eVUWO5CmusHpevFfgpIWcu8XajvOxw+pHr1 h5Iz6LU/NA9Lpe4MMpqkNJekvEIjxiyy+CdmuogisJ1i4iYkzZ6hCWLr8DarJ/2TIAS2 KRog== X-Gm-Message-State: AOJu0YyyuC7dmnR46EEXhSFwAgDpZWOw4iJWJ68Gk6d/COjZQhsCfc6u bnJtXHHzFEHQ4YlLWZINqZJ+PQ== X-Google-Smtp-Source: AGHT+IEmnAhUscM+ELai9UJbSrjbIHumSFpekzbWpdFz9hhQRNPdNIpgopswacO/VqV16BtM9+v2+g== 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 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org 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