From patchwork Wed Oct 23 11:08:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudeep Holla X-Patchwork-Id: 177267 Delivered-To: patch@linaro.org Received: by 2002:a92:409a:0:0:0:0:0 with SMTP id d26csp558410ill; Wed, 23 Oct 2019 04:08:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqzjiIoeDSRbArXJoTWP/wIEY+CW16AAamd4QMbecbMd7yglUUPUDjIDgpIXfvlUKi5AXMHC X-Received: by 2002:a50:8dc9:: with SMTP id s9mr21239751edh.168.1571828928637; Wed, 23 Oct 2019 04:08:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571828928; cv=none; d=google.com; s=arc-20160816; b=M5Q6yyQRSa3sPT3YDqPDqfhHQLX/omh2Xu8WCzqpE0vSPKWjat/pAslz0O58O0IaHd y81ujeyR0/U6oBDT5naUAdaZ1ATTB2+J6wJnoZRV6OUaplvPzpFJm+or4Q4t4XzuYMtw gjg7bztj2jlWBsd6DSqBJDKx4/DVLhKjBmiQkTB3xy5GP9RAavlpNTdARF+YQXx8SvoH IP2Vo41p9raGM6no+uKDvzl7UpJxJhU97YycOTJJdLS23mqaiqgFCpB6qVRxdYDxqOgh Dui3/4Y8m+NrPI5WzWuLFB5ujoNRu08aJInYGHDuClJ60Pkz4EBPT8hgM93mTjCWU0VV eLFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=pU7HYWbfMlxZehU81zjStecGW6NVZ9VTljGBGOoD6PY=; b=AQ7ib9gLRdGcUo5wseYz+nyaZQnMj//Fir8oefXpbC890uAM4ogDffrLF+wQAnexnc UefQdmHqgn8hbSQNNnDz+dElijcclH6ZHMeuQl7x5gTVJ765PxDq2xoh4nvAgSQ6Fng7 NvPmIy02tdhMXFas64dDmBwX/Sxbgtu4Ae49nh6VL7u9eiXXNzSg2EdBBFDoK1tXzKYj IGcQ0dcul7WRPegzgPu9N2mLzPIQcxe2xWrHQIlw6yhyLAQ6fbqinymv6NUekmUjzsBW BVFMjRxulIuMNKBAsOD5m667Cu1VuBLlxvqqN0tLbeDaStrU37R1qzAwlXt1xPcFEU89 oKjw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id og20si6366030ejb.29.2019.10.23.04.08.48; Wed, 23 Oct 2019 04:08:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404667AbfJWLIq (ORCPT + 26 others); Wed, 23 Oct 2019 07:08:46 -0400 Received: from [217.140.110.172] ([217.140.110.172]:48420 "EHLO foss.arm.com" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S2391006AbfJWLIq (ORCPT ); Wed, 23 Oct 2019 07:08:46 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4462B494; Wed, 23 Oct 2019 04:08:21 -0700 (PDT) Received: from usa.arm.com (e107155-lin.cambridge.arm.com [10.1.196.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 58CB83F718; Wed, 23 Oct 2019 04:08:20 -0700 (PDT) From: Sudeep Holla To: Viresh Kumar , "Rafael J . Wysocki" Cc: Sudeep Holla , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] cpufreq: vexpress-spc: use macros instead of hardcoded values for cluster ids Date: Wed, 23 Oct 2019 12:08:10 +0100 Message-Id: <20191023110811.15086-1-sudeep.holla@arm.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A15 and A7 cluster identifiers are fixed to 0 and 1 respectively. There are macros for the same and used in most of the places except this instance. Lets use macros instead of hardcoded values for cluster ids even here. Cc: Viresh Kumar Cc: "Rafael J. Wysocki" Signed-off-by: Sudeep Holla --- drivers/cpufreq/vexpress-spc-cpufreq.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/drivers/cpufreq/vexpress-spc-cpufreq.c b/drivers/cpufreq/vexpress-spc-cpufreq.c index 3259498d7eaa..093ef8d3a8d4 100644 --- a/drivers/cpufreq/vexpress-spc-cpufreq.c +++ b/drivers/cpufreq/vexpress-spc-cpufreq.c @@ -380,8 +380,9 @@ static int get_cluster_clk_and_freq_table(struct device *cpu_dev, goto put_clusters; /* Assuming 2 cluster, set clk_big_min and clk_little_max */ - clk_big_min = get_table_min(freq_table[0]); - clk_little_max = VIRT_FREQ(1, get_table_max(freq_table[1])); + clk_big_min = get_table_min(freq_table[A15_CLUSTER]); + clk_little_max = VIRT_FREQ(A7_CLUSTER, + get_table_max(freq_table[A7_CLUSTER])); return 0;