From patchwork Sun Sep 6 23:04:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rikard Falkeborn X-Patchwork-Id: 11759779 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2824414F9 for ; Sun, 6 Sep 2020 23:11:17 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 EC2B320709 for ; Sun, 6 Sep 2020 23:11:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Hd+Btwbe"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bN9fMPfk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EC2B320709 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=PnE8SxZgERKeYVxU2FK2ZGogkQTGKmK8T95r5grj32c=; b=Hd+BtwbeFhk9tTC+u2FYVID8Z 245Pd00R14KBEuTVMdMtbs3wwQHM33pkm9TRFRXdyGyXHrgugig06r7NXEJIg3wRYKMGARLrrfgLe Al7/LaX/EcB04YSqb4Z/LBadTOX7FKfWGH+TCjXuFvr+NlN5ZRxtAb49qZoBVBHh700qKyJ6399EP WQuLwguhFD8Odr2i1mXNLtaiUOG0COC3zbh7usmq0nguOz/wlbJ0g7YGxha6/61+IcX0CQ2q59Z8/ 9sjPix08lUECvkB1spQ8ZabrPBqDiZzPPJBbw5wCLgDvDG2q4xQT9KrywmJmpRjSpBB3tUAVaxl9u EUQTlMnWw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kF3nY-0002rH-Rf; Sun, 06 Sep 2020 23:10:13 +0000 Received: from mail-lj1-x241.google.com ([2a00:1450:4864:20::241]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kF3nR-0002ot-Q6 for linux-arm-kernel@lists.infradead.org; Sun, 06 Sep 2020 23:10:06 +0000 Received: by mail-lj1-x241.google.com with SMTP id a22so7545824ljp.13 for ; Sun, 06 Sep 2020 16:10:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GL2e83YXWvqOYIIH9Yf2S3bCOInkKRYGV4eNfIULREw=; b=bN9fMPfk5k7AR0RXZmD3e2PZukleLU3FUD4l+Ua7NNZxShSPTZ8k8FS42qZFzmM3tk VjrhWPrca2egAqFJIC5Mh4znxN8A886Ilda96CebD/3fY7ctc1DLWm7G/OrmjGQ10lqF yMj5YCEt52zS/WsWt93oTSknUzvdi4mpVHtCiJ3cZNXzO59jW7KISibCakFfl2iVcEq8 bgOCd/8DrXA9pv6hzf1s1c9kx3xTbUy9zlSkwXPU5DlIEwm0qw9+0AnRQtCK8bMTP6xL SoDsvmd9IaeJleRJ/E3WZEbKVKPc6X++bCxuVzXBscvFrJqszjlIBKKbKIh6yDiJ+ktg ijgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GL2e83YXWvqOYIIH9Yf2S3bCOInkKRYGV4eNfIULREw=; b=S7QLqa73DRHFZ6j+QRMrDIgtOFrto3qC7nlvRvymh9/UNlnz9rWUhOrT/UQ1KyLcsT P4DwO/ok3j3HvscPLQp46Dz8mihT42b13pWnbFoQS+JcNCfjBHSyzl3xlSM88TMdfKwI G6xBw7n5jUzr6NLdsfwbl9GJFCII7N3692gia0ccfEuJjagakHBzx6EGC72RESs4E3n/ 3sZKY9ldg56QxYgl1Oi28t2U6Mni5eripdNXI0SlKzzopsA05r1wdOpK0zY8nHK6iCgw 0RgtY0dXO9c+ZjqzPp+9Ec32DXBYplu3SobEmnk7s91BiZtYNblHgAmZcCWSmbRFUeBs dHXg== X-Gm-Message-State: AOAM530Jb5o/he4NFJ7r1P3KrWLue3N53HCeBcm9lua3VmV1230YEHrg jULV+fX5m+ESby4Y1/NBkXBrmtMdc1hiNA== X-Google-Smtp-Source: ABdhPJxVzhLaV7RvltHlxIG8QGftcXErwcBG811EoA4VbDOXA7EkEe6eiPak6pfnC3MSgUxu1LxDxA== X-Received: by 2002:a2e:91c5:: with SMTP id u5mr9091003ljg.278.1599433802219; Sun, 06 Sep 2020 16:10:02 -0700 (PDT) Received: from localhost.localdomain (h-82-196-111-59.NA.cust.bahnhof.se. [82.196.111.59]) by smtp.gmail.com with ESMTPSA id r17sm1325984ljp.117.2020.09.06.16.10.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Sep 2020 16:10:01 -0700 (PDT) From: Rikard Falkeborn To: linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] cpufreq: arm_scmi: Constify scmi_perf_ops pointers Date: Mon, 7 Sep 2020 01:04:50 +0200 Message-Id: <20200906230452.33410-2-rikard.falkeborn@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200906230452.33410-1-rikard.falkeborn@gmail.com> References: <20200906230452.33410-1-rikard.falkeborn@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200906_191005_866747_3301F5AA X-CRM114-Status: GOOD ( 13.81 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:241 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [rikard.falkeborn[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Viresh Kumar , "Rafael J. Wysocki" , Rikard Falkeborn , Sudeep Holla Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The perf_ops are not modified through this pointer. Make them const to indicate that. This is in preparation to make the scmi-ops pointers in scmi_handle const. Signed-off-by: Rikard Falkeborn Acked-by: Viresh Kumar --- drivers/cpufreq/scmi-cpufreq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/cpufreq/scmi-cpufreq.c b/drivers/cpufreq/scmi-cpufreq.c index fb42e3390377..46b268095421 100644 --- a/drivers/cpufreq/scmi-cpufreq.c +++ b/drivers/cpufreq/scmi-cpufreq.c @@ -29,7 +29,7 @@ static const struct scmi_handle *handle; static unsigned int scmi_cpufreq_get_rate(unsigned int cpu) { struct cpufreq_policy *policy = cpufreq_cpu_get_raw(cpu); - struct scmi_perf_ops *perf_ops = handle->perf_ops; + const struct scmi_perf_ops *perf_ops = handle->perf_ops; struct scmi_data *priv = policy->driver_data; unsigned long rate; int ret; @@ -50,7 +50,7 @@ scmi_cpufreq_set_target(struct cpufreq_policy *policy, unsigned int index) { int ret; struct scmi_data *priv = policy->driver_data; - struct scmi_perf_ops *perf_ops = handle->perf_ops; + const struct scmi_perf_ops *perf_ops = handle->perf_ops; u64 freq = policy->freq_table[index].frequency; ret = perf_ops->freq_set(handle, priv->domain_id, freq * 1000, false); @@ -64,7 +64,7 @@ static unsigned int scmi_cpufreq_fast_switch(struct cpufreq_policy *policy, unsigned int target_freq) { struct scmi_data *priv = policy->driver_data; - struct scmi_perf_ops *perf_ops = handle->perf_ops; + const struct scmi_perf_ops *perf_ops = handle->perf_ops; if (!perf_ops->freq_set(handle, priv->domain_id, target_freq * 1000, true)) {