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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 536BDC433F5 for ; Wed, 29 Sep 2021 04:45:38 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1FDDD61247 for ; Wed, 29 Sep 2021 04:45:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1FDDD61247 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sholland.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=arInq2AARfJKl40K2IP4r/1AVrtkheIbKrIArV570oE=; b=CFxEbVCJBcFcgk 88bunyIioDxfmkOWPMBzOoeQltiiL2W/2bciCT9sIKWqQ5xA0qcdjgJ4hHy7trjPL8fqlyeRHdDj5 hQLG6u7G7NN/zbjLPp6t4OksgSWUnERAHOqkmwDdZxjn24DiZlDfRC0tK8pqP81hG9H9i/bgomaPd +Y/53zP6R+3NtfAIu5a08STc5Pr2qUszvsQkmv674iS6/PxATHdNowvE43elHHoQ2NwZiSPg+W5bv lfsNAXdP6ioYjpJQK9kYnWg5jPg/vR4Fw28/t4g2zyCvqGlB/rDWJ2fGfVkU9qAYSkkzXQerMLBm/ pvcRlvDTZP3C7aCUsZ3A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVRR4-009zq4-QS; Wed, 29 Sep 2021 04:43:15 +0000 Received: from new1-smtp.messagingengine.com ([66.111.4.221]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mVRQp-009zj3-EL for linux-arm-kernel@lists.infradead.org; Wed, 29 Sep 2021 04:43:00 +0000 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210928_214259_592353_5841F2E1 X-CRM114-Status: GOOD ( 14.45 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel