Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5870982rdb; Thu, 14 Dec 2023 01:51:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IFWtgvLu5+bf1rYsy7hbQ3OQwiGvVr2rcFfiXl+ppU+NnDzeS0mC0En4ZjqHDd48qj4oEM5 X-Received: by 2002:a05:6e02:154d:b0:35d:a3ce:4e46 with SMTP id j13-20020a056e02154d00b0035da3ce4e46mr12355205ilu.51.1702547480726; Thu, 14 Dec 2023 01:51:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702547480; cv=none; d=google.com; s=arc-20160816; b=zl3PK/M9Qi+BLrBzxjFuM04Xy0XLJyjwZvbCJ0/vHPbEX1LcLxZdwynkLCuGs2/9GT 0ee2ZoalULatW4l0QpgldAKYt86aerEOEx7NMFGmbXscoyUdflxck2vJ7ZThcQfu4+pn p1usrecqwWfFyDW40HboiTBsc5yWmYEheWKJA98/nwQl9g+CIpkvOwQKIxR/LfgvyPBQ 5crYFBYKKWv/fXxiEHHic4Bf7I0cM74co86TQmLYKjYf6qmfIxKZ5eQlJLDSLDqNGn8I mvCxmhZbJpbI2KladX9h6suzRCHsm9P2g4sWhjHhS5vXlzEEXCca1Q9d4LjT5MB1j8X8 TsEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=7twg+q8e9W84G9By0gAoFg8Nxt3jPN7GYDXXUHl+Fzg=; fh=TxQkXa45XN3og/v/t55Z6u+FQejs1Vb49lLLP0fF2as=; b=smilZvAP6uSawAozvJSoZiZ8JUdlepx44Tg8KixF6qHlu9YWzBaIAgpAcl8/QRBqIh dDVida+FYskW2tw9zZbpVUH4QA57I07rA1+T1Hk/sCwO/a+VvDRK/DNFM+QCcmyrN4Ae kr2xGevwrAToSsL2pY3+5D+Ce+xP6EokKkoHedm57No+dCbFLKTImXlbRGj2zFfGg1BI 6F+J3VS7ZbxMHqoGC1MP5a8Ds74EIMthCShsBwWrRLU3eWK3pwQXsquUwiMt+263ZovI dNpMSGGgw8KnnuTC6sJjQshkPV2V9wwIVGI0TNXx6D6L8wUsp4kKwh58fb2GZUUn2xxZ 9Eeg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id q6-20020a635c06000000b005c67196cbf5si11140069pgb.330.2023.12.14.01.51.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 01:51:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 01EEF8027161; Thu, 14 Dec 2023 01:51:18 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443597AbjLNJvF convert rfc822-to-8bit (ORCPT + 99 others); Thu, 14 Dec 2023 04:51:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443600AbjLNJut (ORCPT ); Thu, 14 Dec 2023 04:50:49 -0500 Received: from mail-oo1-f51.google.com (mail-oo1-f51.google.com [209.85.161.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADDA81FDE; Thu, 14 Dec 2023 01:50:09 -0800 (PST) Received: by mail-oo1-f51.google.com with SMTP id 006d021491bc7-5908b15f43eso716882eaf.1; Thu, 14 Dec 2023 01:50:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702547409; x=1703152209; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=H7IcPRb+X4qnuTs0aHDHBpi/NcRx3U1FPPLkX97/vT0=; b=YbeMpdvl+8fpL4KZeR71OUAvsadM6ll1fnobE4c5xVpaPyVx9BsD5CmWjYjWkJcB6V O08FJRtm7JDLwwxSSc5dO2yF/jlyK7fn+b/CziPgiRRwMOAOuiCTWjUN5/vLt8aIchf2 6y0E3f3jbjdnkN303TYIk0np5z4pU5X8YwJjo59rnSH6jH048OHI0aGiXmrBdOwG8FFR Tlsza9GJeow+046NbPZqRejENW9OMr+TdtuHQYDvnqahSGCSzxZJ/le2rqvFVXyRjpxh rO4Jyk2iYEt/jnL8p9eZ5JG7P6FfL3VmLxSwp9zdUfGdvaZV/mzDW3Fp/zXsxHR7Ieoc NrFw== X-Gm-Message-State: AOJu0YxtYeyXb/ibQEhdwSikq128CVRX7G6FUOTWO4DWR+Wfi2EC5hZc /6cOquHRy8lGdp/8tCRqeiAITxhbAZ0NTVET61c= X-Received: by 2002:a05:6871:2284:b0:1fb:648:5207 with SMTP id sd4-20020a056871228400b001fb06485207mr17719939oab.2.1702547408842; Thu, 14 Dec 2023 01:50:08 -0800 (PST) MIME-Version: 1.0 References: <20231213175818.2826876-1-daniel.lezcano@linaro.org> In-Reply-To: <20231213175818.2826876-1-daniel.lezcano@linaro.org> From: "Rafael J. Wysocki" Date: Thu, 14 Dec 2023 10:49:56 +0100 Message-ID: Subject: Re: [PATCH v1 1/2] PM: QoS: Rename freq to range constraint To: Daniel Lezcano Cc: rafael@kernel.org, caleb.connolly@linaro.org, lina.iyer@linaro.org, lukasz.luba@arm.com, quic_manafm@quicinc.com, quic_priyjain@quicinc.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Thu, 14 Dec 2023 01:51:18 -0800 (PST) On Wed, Dec 13, 2023 at 6:58 PM Daniel Lezcano wrote: > > The frequency pm_qos relies on a couple of values, the min and max > frequencies. However more pm_qos will be added with the same logic of > a couple of min and max. Instead of writing new set of constraints as > well as type, etc... let's rename freq_* to a more generic name > range_* > > That way, new qos range based can be added easily. > > No functional changes intended. > > Signed-off-by: Daniel Lezcano > --- [cut] > --- a/include/linux/pm_qos.h > +++ b/include/linux/pm_qos.h > @@ -77,25 +77,26 @@ struct pm_qos_flags { > #define FREQ_QOS_MIN_DEFAULT_VALUE 0 > #define FREQ_QOS_MAX_DEFAULT_VALUE S32_MAX > > -enum freq_qos_req_type { > - FREQ_QOS_MIN = 1, > +enum range_qos_req_type { > + RANGE_QOS_MIN = 1, > + RANGE_QOS_MAX, > + FREQ_QOS_MIN, > FREQ_QOS_MAX, > }; I'd rather do: +enum range_qos_req_type { + RANGE_QOS_MIN = 1 + RANGE_QOS_MAX, }; +#define FREQ_QOS_MIN RANGE_QOS_MIN +#define FREQ_QOS_MAX RANGE_QOS_MAX and they would map exactly.