Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp573162rdg; Thu, 12 Oct 2023 14:16:27 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGixZn5rnRFZ0N+VMdBNns+0b2jkgFb+170iM30okNzdQlugywG3xAjx2VBEo1pphtxdXcA X-Received: by 2002:a17:90a:d80a:b0:26d:1a46:1646 with SMTP id a10-20020a17090ad80a00b0026d1a461646mr21569643pjv.48.1697145387042; Thu, 12 Oct 2023 14:16:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697145387; cv=none; d=google.com; s=arc-20160816; b=ShsrAtoL+FD5vIRJ683Zpuib3CpdeTYIEs6371ctqEf2q/dynsGni+5FYxOsS+Umov /cNkrN3aQ/m4x6uEi2V7KUkg2H/8nLk6gal7BfOGV77luWQgCTR5FSnktYWOeKk7dpVv JP0rIzNh99JnR9DnKsCBgFA9DmqBhXzxa7Yt06mU4eTKPviRdEf3nBUJ2vdDmOaKEapc kL/c6mFZn2yIo7P+VhJR/TVFwfT2Jk4FCvMjQMuAfEtnJzMinQlZ82ljqwGfQzoWvbQH UKPGQcg6ESevUl5iwDQmpcLwajdSnEEWPo2FOo/Gy4pNRZtUTmonIyp2J2xg/En7SLd3 +L+A== 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=fM0DXXboWe5a80zsbvWwo3m0mrD8GmZVCasDLYdIcEM=; fh=lwSoWzxFgElz870zfiYjK9IUzI6DgmKcUjvGVkpbGwE=; b=lQmm7ldQdArPaEyKDzb1tBkFlxvuOwc1YD4z06COEJG61fHnerWyWlf4zrojHrFBrH TUCX8H0uVxhTctgxCOvXktxQT3HTX2AOpm75+BmugJXoVW9ysNgEgutNzpWrYuRVBoXe NtlRuzzDc3dhPavtPpEJZMbjT0T7n+I02GVQPTmDGxO3EFRMDKtZyjKJOLf3ZZaFC35y X8ZYHZ4ZZSrCYN7RMzC8qjzIwsluF6nXaRN1WpYk0JgPNShEh9JoReBea78sReTkz+Vw E/inGCbcqjDTBYKVDP48FlFhOaFXsJVIZUUwfzYZo2eZXx2PDm3OYErXCr8VWKJcwz2h wAwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=P7WQLGDx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id br14-20020a17090b0f0e00b0027cff4f35cbsi2938554pjb.73.2023.10.12.14.16.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 14:16:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=P7WQLGDx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id 08075803E7B3; Thu, 12 Oct 2023 14:16:11 -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 S1442869AbjJLVQC (ORCPT + 99 others); Thu, 12 Oct 2023 17:16:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1442853AbjJLVQA (ORCPT ); Thu, 12 Oct 2023 17:16:00 -0400 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0004C9D for ; Thu, 12 Oct 2023 14:15:56 -0700 (PDT) Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-405361bba99so14549665e9.2 for ; Thu, 12 Oct 2023 14:15:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697145355; x=1697750155; 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=fM0DXXboWe5a80zsbvWwo3m0mrD8GmZVCasDLYdIcEM=; b=P7WQLGDxIpcgOFEAVxE9bJ75x2ynuqHs+SEd9MknG+R39JD8CTEw4DPxA9Kj/P41GF EZ2snNZMhdXe70w+aehWMBpsUXO6+SkAsndXHFa+ZYqACWNaW+wXcO6GPNQC6I0w7rTK WRR/EWuG3ntYbdOUexfRsZgBX+t3NfVINGsi64WYBlkMrmEVyYVPHutt+7ED7v7MWsGb jp4Jgyc+LuhuCjwxznaVCq5NpQY733o6TJVMNO4i8rkcxyM9Kjkpd8/YRIMiRQLxk0fA tt8La86xNxOK91yYh+6mYJZx21T582fluM9whGp8l0PXiuSMiEjR/A38vSisNLsn7vWu 0avg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697145355; x=1697750155; 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=fM0DXXboWe5a80zsbvWwo3m0mrD8GmZVCasDLYdIcEM=; b=gh28xU16iSuYBZu2xWrEu9iiSj6fiKszxpMIoGvl3BcwCR9xoeD9l76kQw+NPw2FU4 y31Ze7lRauN7OqS+NcYrxufHrT2ufu37j3vRSvluDx3opGcr9EOQb1LI8rE+K1CqA954 67Nuua9jXFJBUhhWBmyvXF/hBvZpcyB2ERQe5DhLC0k/elzjhanTRSs/yG0ISzPEnD4o F1ud7hKRdnzftIJkSrvOu2MABgR/+fqLefV63mmJUpEqadNuL58eBVufJQ0Wj45IS2vz P7FvbmJBoadoW+xgv7/o0xFjOm2ArWb36mypMPcHpJUCkc6Wmy9ZykEGOLVAf2bLRjRu SHdQ== X-Gm-Message-State: AOJu0Yz120rkWgFmdD9gg6a5dLCvsp0lakk57LRsEbIIX3AOFSh/IAev g8jtNu3MYoyf3kTwP0Eyr+NwLQ== X-Received: by 2002:a1c:7419:0:b0:3fe:89be:cd3 with SMTP id p25-20020a1c7419000000b003fe89be0cd3mr21652442wmc.22.1697145355443; Thu, 12 Oct 2023 14:15:55 -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 l25-20020a7bc459000000b004054dcbf92asm779383wmi.20.2023.10.12.14.15.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 12 Oct 2023 14:15:55 -0700 (PDT) Message-ID: <561802cb-318c-4a83-92e6-5328be1106d4@linaro.org> Date: Thu, 12 Oct 2023 23:15:54 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 3/6] thermal: gov_fair_share: Rearrange get_trip_level() Content-Language: en-US To: "Rafael J. Wysocki" , Linux PM Cc: LKML , Srinivas Pandruvada , Zhang Rui , Lukasz Luba References: <5734364.DvuYhMxLoT@kreacher> <2176566.irdbgypaU6@kreacher> From: Daniel Lezcano In-Reply-To: <2176566.irdbgypaU6@kreacher> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, 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 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]); Thu, 12 Oct 2023 14:16:11 -0700 (PDT) On 12/10/2023 20:29, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > Make get_trip_level() use for_each_trip() to iterate over trip points > and make it call thermal_zone_trip_id() to obtain the integer ID of a > given trip point so as to avoid relying on the knowledge of struct > thermal_zone_device internals. > > The general functionality is not expected to be changed. > > This change causes the governor to use trip pointers instead of trip > indices everywhere except for the fair_share_throttle() second argument > that will be modified subsequently along with the definition of the > governor .throttle() callback. > > Signed-off-by: Rafael J. Wysocki > --- Acked-by: Daniel Lezcano -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog