Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp270907pxb; Tue, 28 Sep 2021 21:45:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzlKzKBOYAummkogN1WQIxM8b9nVwMwgQfa67uGXCjsjPAf89toZgW13x9EKjt7rmgbgHDI X-Received: by 2002:a17:90a:af92:: with SMTP id w18mr4102273pjq.98.1632890754686; Tue, 28 Sep 2021 21:45:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632890754; cv=none; d=google.com; s=arc-20160816; b=XipW3/+bMc1unDuYk0btPXiIC1J/5nzKlsKrZqNYEr6D50IOptS9N0WXEm4eC8aW6c yVezWFfn7b8Tj/s8E4OdKolkra6oVZyyxi5rKFa8kFpJkC0ZDIIxw9jHMcbvv0NN6hWh TeG+dcS+xuvjNrZHwU6eg8pV0y9cWdHQcpUUv1ebEvObS0n1CmyrCgQD7OersQSHOzZi ZuGvwQmpBFydwUAvEl5+PXsz++qvf9UmlIlNyC5mfnIgtJ81Z6q6Ew2WI/W1HmfMaEyT eugNblr6+dTRju/rOnEK3OmcrnY2Da3ttobnWj2sVWDlcIO/Yy9ENWPdZ0uaxl3ZiEnW CYlw== 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:dkim-signature; bh=H92gfwIVzRY+xFr/42obeioOfnah5ra1k8IBJ11GR04=; b=lQ8wYwk+vVpCw0iimnCqXi/N8i8ZOr7gnvoB4vVxb9C1E0zWHM7B5zbUBjrfFVhZ/R YNIzZ9uuLnufQKmEx2pdWD1Er7dC3n86zMa+/2DDWOQGw5C0zNqGuA/f9kxF6j8wGquX 7WRPfCsQQVA0X9Gl3ugZk8Ig1p1GEaYJMAZ745H3GDs+ncLVofSDiEwyU8i3giP2im+e /AmgmFY2P+6CNUHBJ2lHqDSBrParlVDBDr5k5RYd+T8ylkFKyX6fLq45y3yOefOvKaZJ AO63my9uzwe+AzNpsY8uiRAsdrFl2yGSxM82khkmEFgEUO89T0uoOwEbuW1dI96ET1Zr bVIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sholland.org header.s=fm3 header.b=O1Q9kaJR; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=ez1u0+uL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ls3si387879pjb.138.2021.09.28.21.45.41; Tue, 28 Sep 2021 21:45:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@sholland.org header.s=fm3 header.b=O1Q9kaJR; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=ez1u0+uL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243800AbhI2Eop (ORCPT + 99 others); Wed, 29 Sep 2021 00:44:45 -0400 Received: from new1-smtp.messagingengine.com ([66.111.4.221]:46255 "EHLO new1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243992AbhI2Eoj (ORCPT ); Wed, 29 Sep 2021 00:44:39 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id C0880580DCA; Wed, 29 Sep 2021 00:42:58 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Wed, 29 Sep 2021 00:42:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm3; bh=H92gfwIVzRY+x Fr/42obeioOfnah5ra1k8IBJ11GR04=; b=O1Q9kaJRG8Sq/CANgvn3+5zOcJLqP 9HFsTcqkq9F1+AzZ23N6cu0IQgY3tZesh9HlDkfFoWkC0P0Oxyettxdy37GL5KZP CcFbeCqbj2Qs8Vw6PvXipu685l7bQAcXPzCDH+m6gxgskrzEinbacsVLNlw9GEJH XSdp5+gkPJN6onzC1QEnLlwx6GCid4JG4ccsBm8MTgkJQ7tGy/T7nvgPLntniEj2 VYY6lqKxDin92zIvt/M0U9QVuG2e+6TXlxaCEuu3FIrJPA3TfNr0i4wBjLfKQpPm tAb2i3++kxds6xqZUqt56v1Hz6Xmxxxm1aCWGZq+A6dRf/KA8Iy85yAxQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=H92gfwIVzRY+xFr/42obeioOfnah5ra1k8IBJ11GR04=; b=ez1u0+uL R+QOSiPSMTPDA1LTHgU5xe2kReydCd43K3Dxe5RzZzGwP/Ya4/rhjXtSvPHvSkQH NAsEzRwHiOjORjAAGi8/wvhnwaIqn95QsjKi6ziaHYLX0uEByGv515Bi0riBhIGU z5VThEMOugoBKYNCHedUroFR2y3nVwtdFqvLAe8lZzwCkj/utNDumUefWYRoQnRQ sAFyZ5p9g4dJbkWYsVEY1AYFL0CpRn1TDUqoIrVc+fMeJ5fi20jBXLUlbTdnfdLd 5krup7xuVhbioRaYZX4OLxYQl2U9pWIsTEkSX5lYPU5c8c8pQYLwmrHZIVBmt4RV xm64RP4TTl2doA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudekuddgkeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefurghmuhgv lhcujfholhhlrghnugcuoehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgqeenucggtf frrghtthgvrhhnpeduhfejfedvhffgfeehtefghfeiiefgfeehgfdvvdevfeegjeehjedv gfejheeuieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 29 Sep 2021 00:42:58 -0400 (EDT) From: Samuel Holland To: MyungJoo Ham , Kyungmin Park , Chanwoo Choi , Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , Rob Herring Cc: Michael Turquette , Stephen Boyd , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Samuel Holland Subject: [PATCH 03/10] PM / devfreq: Drop code for descending freq_table Date: Tue, 28 Sep 2021 23:42:47 -0500 Message-Id: <20210929044254.38301-4-samuel@sholland.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210929044254.38301-1-samuel@sholland.org> References: <20210929044254.38301-1-samuel@sholland.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since commit 416b46a2627a ("PM / devfreq: Show the all available frequencies"), freq_table's documentation requires it to be sorted in ascending order. That commit modified available_frequencies_show() to assume that order. This is also the order used by all existing drivers and by set_freq_table(). However, there is still some code left over for compatibility with a freq_table sorted descending. To avoid confusion, let's remove it. Signed-off-by: Samuel Holland --- drivers/devfreq/devfreq.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c index 426e31e6c448..f5d27f5285db 100644 --- a/drivers/devfreq/devfreq.c +++ b/drivers/devfreq/devfreq.c @@ -130,16 +130,10 @@ static void get_freq_range(struct devfreq *devfreq, /* * Initialize minimum/maximum frequency from freq table. - * The devfreq drivers can initialize this in either ascending or - * descending order and devfreq core supports both. + * The devfreq drivers should initialize this in ascending order. */ - if (freq_table[0] < freq_table[devfreq->profile->max_state - 1]) { - *min_freq = freq_table[0]; - *max_freq = freq_table[devfreq->profile->max_state - 1]; - } else { - *min_freq = freq_table[devfreq->profile->max_state - 1]; - *max_freq = freq_table[0]; - } + *min_freq = freq_table[0]; + *max_freq = freq_table[devfreq->profile->max_state - 1]; /* Apply constraints from PM QoS */ qos_min_freq = dev_pm_qos_read_value(devfreq->dev.parent, -- 2.31.1