From patchwork Fri Jul 21 09:40:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 123777 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp115005vqg; Fri, 21 Jul 2023 03:47:44 -0700 (PDT) X-Google-Smtp-Source: APBJJlHd1gWnNx+hDQjcaNmSGBgWnDhHKcE4XXiTXR475SoDw70tBA1eK3sHcoPiIDsLxO9hDZDi X-Received: by 2002:a05:6808:10a:b0:3a1:d629:d1dd with SMTP id b10-20020a056808010a00b003a1d629d1ddmr1576649oie.56.1689936464702; Fri, 21 Jul 2023 03:47:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689936464; cv=none; d=google.com; s=arc-20160816; b=hbDEn9/KHDbkFs1nkZTGAEdIjRA9ZQOvToJbaWqHJsdgIhbzBy+2kArOSBuUZzG8Vp NYdt3A4QR/FNiFl5O+GzCFWIN1hE+aHFIq4IJpLBceHe392w5Z5Ixgmx4eHkHIQ25tSu QNsszd5zEdZLezTyHuQNQznbUDo6SCgf2a5mLKGE3IVY+fUIiYe2ABVFrC2qBjJy/Mjn FOsC6cGWcxE8qaT9lTJqk3PSxB+WpUtpSiqlTwzflp+Qoos01lcXiFskLxbEPVWG4Mkr oFZLLjHUNfKQ58XyA7LfKdJW+mgX01n60YZMRqb+dlOAKm7OEtNblXIZM4s57ZuS5DmH wVlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=C6yDwHR8CjSzLvtEor6MI6CE+UiAGOZc12BD4oiDuSo=; fh=TQKnco0ggU+zuPYQtU1mJz8+bM+vQUgmoNY/SIUMevI=; b=z83FmAv3VLoo0BbksrmuD1LZz2jba+BjWJBsbkBYwZdadeIIjtxJsgDZEbbdb0DkM+ i5ARRF7nCP8fPeTH0fqLdjgffI7SpZFzirjYnQ06zQouxXjaNA3U5tGlu6VPDZuU61oR vXAdxeLKEBYfXm1m4ArCmZfWIOQkKGul61pLJiVXN08k5KKw47+GU9EshzPBc4cNwsdp nWHcjOILAP04k0ez+rBlms9A/0N7BdkRMeY+SKBINN6pnS8LP8iXSavjmKGCROsC8wj6 8sICAqYcnVa9aLhCKQhCEK8EnHZk+5rsnlmBDiCrpTUM8+gq5ZdLRFy/miqN8Vv0LKQg fNrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PdKQDS+1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mh3-20020a17090b4ac300b0026350f0644asi3149011pjb.65.2023.07.21.03.47.31; Fri, 21 Jul 2023 03:47:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=PdKQDS+1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S230143AbjGUJlS (ORCPT + 99 others); Fri, 21 Jul 2023 05:41:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230029AbjGUJlO (ORCPT ); Fri, 21 Jul 2023 05:41:14 -0400 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CB282D46 for ; Fri, 21 Jul 2023 02:41:13 -0700 (PDT) Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-1b89d47ffb6so10390125ad.2 for ; Fri, 21 Jul 2023 02:41:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1689932473; x=1690537273; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=C6yDwHR8CjSzLvtEor6MI6CE+UiAGOZc12BD4oiDuSo=; b=PdKQDS+1nlXydb+5R8TxjZ7RbKzetxDiuD7HuGUHno/JNfMOM1u+Wugb/3enYlBk0a /yJRnGtbDQsFLP5Vhtcis/4Q0J2RY5Jvk1NWjHcaBmvu/RgtuWqDmAu1uMk4YoeqtNxp iyUHSBJydok2kBv/ryvHmscoax+3oJELdtfRGtyX3zf9qdxnN5E8N6nWLvy4rpkmOT4o hRLSF8TeHyf1FdQgQvchDb/1d+iNwbwiMdFQtZE3BOcPI4Nm2W2XM1aV5U21xenx9YR4 6qLMKQhJBb1JrYhh5dsRcdbVTcrrrhYgSEkDq0I/7XhH7qQUISf3qrSnpBlXHl+RGbS/ /uMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689932473; x=1690537273; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=C6yDwHR8CjSzLvtEor6MI6CE+UiAGOZc12BD4oiDuSo=; b=PjTiMFKsUe9iZLpOQMlMBnGJ5Qm1SpExTtDeDRkNHjoDuiSHT7chEIeh2+9UF25kBw f/AwS47xCfuwio/Zg95QrTeamN8jqhjOpfDZsp0NvaPvrz9YRppDUOLw21EtlQciUtuy 5xcaedHUFtOCJpEtuwJOIuvnYUhPcsdk5hceG24uOKzoxSvl1fh5mE5ncmilU4uacLsg 8z6X4W4w0pY2QDO7Ac3e/WlvADRkeTzt4H7h2L60phn7zIHFGbBUt4aN8lDIBasqC9cM YfUtk5HVryhhssdfw8B3xnJagh1sytsbamxz2hCgYodZz6Ts+LUp3bRktRsnlndbNndJ d47g== X-Gm-Message-State: ABy/qLYlfgPUwWy2EPjCAhhom2gT0TWspYVI5GcqEinxh+TMbyuYj2kU 44ZbhdZ8n2QUucAi9nk1RtBbLQ== X-Received: by 2002:a17:902:ce84:b0:1b6:ba60:77f0 with SMTP id f4-20020a170902ce8400b001b6ba6077f0mr1347225plg.10.1689932472961; Fri, 21 Jul 2023 02:41:12 -0700 (PDT) Received: from localhost ([122.172.87.195]) by smtp.gmail.com with ESMTPSA id c1-20020a170902d48100b001b895a17429sm2959770plg.280.2023.07.21.02.41.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Jul 2023 02:41:12 -0700 (PDT) From: Viresh Kumar To: Viresh Kumar , Nishanth Menon , Stephen Boyd , "Rafael J. Wysocki" Cc: Viresh Kumar , linux-pm@vger.kernel.org, Vincent Guittot , Manivannan Sadhasivam , linux-kernel@vger.kernel.org Subject: [PATCH 1/6] OPP: Rearrange entries in pm_opp.h Date: Fri, 21 Jul 2023 15:10:54 +0530 Message-Id: <754833b3194c30dad5af0145e25192a8e29521ab.1689932341.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.31.1.272.g89b43f80a514 In-Reply-To: References: MIME-Version: 1.0 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_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham 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-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772026818157531398 X-GMAIL-MSGID: 1772026818157531398 Rearrange the helper function declarations / definitions to keep them in order of freq, level and then bw. Signed-off-by: Viresh Kumar --- include/linux/pm_opp.h | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h index dc1fb5890792..3821f50b9b89 100644 --- a/include/linux/pm_opp.h +++ b/include/linux/pm_opp.h @@ -121,17 +121,19 @@ unsigned long dev_pm_opp_get_suspend_opp_freq(struct device *dev); struct dev_pm_opp *dev_pm_opp_find_freq_exact(struct device *dev, unsigned long freq, bool available); + struct dev_pm_opp *dev_pm_opp_find_freq_floor(struct device *dev, unsigned long *freq); +struct dev_pm_opp *dev_pm_opp_find_freq_ceil(struct device *dev, + unsigned long *freq); + struct dev_pm_opp *dev_pm_opp_find_level_exact(struct device *dev, unsigned int level); + struct dev_pm_opp *dev_pm_opp_find_level_ceil(struct device *dev, unsigned int *level); -struct dev_pm_opp *dev_pm_opp_find_freq_ceil(struct device *dev, - unsigned long *freq); - struct dev_pm_opp *dev_pm_opp_find_bw_ceil(struct device *dev, unsigned int *bw, int index); @@ -247,32 +249,32 @@ static inline unsigned long dev_pm_opp_get_suspend_opp_freq(struct device *dev) return 0; } -static inline struct dev_pm_opp *dev_pm_opp_find_level_exact(struct device *dev, - unsigned int level) +static inline struct dev_pm_opp *dev_pm_opp_find_freq_exact(struct device *dev, + unsigned long freq, bool available) { return ERR_PTR(-EOPNOTSUPP); } -static inline struct dev_pm_opp *dev_pm_opp_find_level_ceil(struct device *dev, - unsigned int *level) +static inline struct dev_pm_opp *dev_pm_opp_find_freq_floor(struct device *dev, + unsigned long *freq) { return ERR_PTR(-EOPNOTSUPP); } -static inline struct dev_pm_opp *dev_pm_opp_find_freq_exact(struct device *dev, - unsigned long freq, bool available) +static inline struct dev_pm_opp *dev_pm_opp_find_freq_ceil(struct device *dev, + unsigned long *freq) { return ERR_PTR(-EOPNOTSUPP); } -static inline struct dev_pm_opp *dev_pm_opp_find_freq_floor(struct device *dev, - unsigned long *freq) +static inline struct dev_pm_opp *dev_pm_opp_find_level_exact(struct device *dev, + unsigned int level) { return ERR_PTR(-EOPNOTSUPP); } -static inline struct dev_pm_opp *dev_pm_opp_find_freq_ceil(struct device *dev, - unsigned long *freq) +static inline struct dev_pm_opp *dev_pm_opp_find_level_ceil(struct device *dev, + unsigned int *level) { return ERR_PTR(-EOPNOTSUPP); }