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: 11759767 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 33DDD14F9 for ; Sun, 6 Sep 2020 23:10:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 18597214F1 for ; Sun, 6 Sep 2020 23:10:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bN9fMPfk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726511AbgIFXKH (ORCPT ); Sun, 6 Sep 2020 19:10:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726349AbgIFXKE (ORCPT ); Sun, 6 Sep 2020 19:10:04 -0400 Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E19FCC061574; Sun, 6 Sep 2020 16:10:03 -0700 (PDT) Received: by mail-lj1-x243.google.com with SMTP id s205so13954200lja.7; 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=Qdv/PQtOlLbYAaDHNO5qLP2wHXiJN09uqEmFj/O4pClhUrHvfSFFQqT3p9LiJqUMHs o98hZcVu/Amo0g6cwb2oOQNqu/2FDMljb3OiUqRBMBgWKUHk2FoXE06XUX/tMU+PkGq6 nopmw1d0OpQEKUConmlrZ+5c+m7cLrYvakxuviO4+z9cPpUvWizN+Db7m+GCFrK/6Svb XHa31HWsDznpBItKC5rrO4E6lv14efmNsmBbR9VT8J+yegX/WTCiuhpRAvmrB7bhWQYM t9+GQwCclvDUuwiMGgXODBCD1Kuv512tT3AfdcmFM90UZZPThta1WAlSJo5AWwH7q7pr 26pg== X-Gm-Message-State: AOAM531EVZRDun0DyUt0DJcib+JRW9GACBmrRjhBLczfSGMAv0IdmF/G 3rxGkSuQ45Ci94bZhkBt7M0= 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 Cc: Sudeep Holla , "Rafael J. Wysocki" , Viresh Kumar , Rikard Falkeborn 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 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.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)) { From patchwork Sun Sep 6 23:04:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rikard Falkeborn X-Patchwork-Id: 11759775 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 02D58618 for ; Sun, 6 Sep 2020 23:10:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DB9AC214DB for ; Sun, 6 Sep 2020 23:10:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="A5/7U7PG" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726288AbgIFXKX (ORCPT ); Sun, 6 Sep 2020 19:10:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726401AbgIFXKF (ORCPT ); Sun, 6 Sep 2020 19:10:05 -0400 Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0836C061575; Sun, 6 Sep 2020 16:10:04 -0700 (PDT) Received: by mail-lj1-x244.google.com with SMTP id u4so13054018ljd.10; Sun, 06 Sep 2020 16:10:04 -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=NUGRQoQOfkm+Q1r5IdMfVQrE6dq9XkDPp8w5VNp/XW4=; b=A5/7U7PGysC7Lat9H1X1WrQsULCsjbslDkwUVOG/iH1O9q2QWz7FE1iJUxhr58Hj/4 V20PbyZt46CuVFG041pKscToJe7Lh0LiDjHeXOLOV/b9WDgUux8u2PDxnJzlLnxpamZ/ 0BZf34CJxQOg9XSJ6oJEKfNmEkzFJe8hWPCZoJz6Wcdd1btLhc5lPXSntl/jUg7nd/Gt wsB5UHchdcYkOtOj9KNPHwNFTwPq2i+f0ju5BKC1EsUMg42BJTNHkPONB971GDL8nck5 qF2WqdtKfm5Dur+zbkitJf39PTujSzjC1DuHJsmJopAYg8rWuSXvX+oIL0yYYYP7E3vW UPKQ== 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=NUGRQoQOfkm+Q1r5IdMfVQrE6dq9XkDPp8w5VNp/XW4=; b=pr0hOZiRlos/aqs2jkWPfImblOxZmflO7YzSld9xkZKFcWbA/HYyY6fQwU25LFn9TO Rq/EPENrWyoxBlgMn1h0Pc2265XFrZdiAEYROtis8QMr2ZyMipxaiJqnSfTCLOQfnn1e W+/rjuHdw3EVZFyIXJCSo9R67LJ2xpxVQFjxzoA5E6Q+4nUqQ5qIJaqBIeqo5R7o4ieT 4hoJ+b9mmZn9+u2NM9tMSmflJxsjqdwHHtwa/YvPT2Dt9aZgrBz1VCwJ0df8t7//PUB7 1kdsUqJ7UMairPnLdIA+u6Evg6sv1vGD1J+CwyLK5vO+dQoFB/C/R4YGoWfdgSxDUHaV dlVg== X-Gm-Message-State: AOAM532rxYqTbR/f9gg7lwR6GMtiS6h1O/0+7+buPfDGaEfMLKt2MToX DAawBSXwzxEwRsh42W20oKc= X-Google-Smtp-Source: ABdhPJztcsF1D/9+BjP+M7FHssI19IN5D3FuSHqwt6KE+HfThPz7XhqQAk2eIXbCTe8Ozp1yUuG1PA== X-Received: by 2002:a2e:8798:: with SMTP id n24mr6018798lji.373.1599433803479; Sun, 06 Sep 2020 16:10:03 -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.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Sep 2020 16:10:02 -0700 (PDT) From: Rikard Falkeborn To: linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Sudeep Holla , "Rafael J. Wysocki" , Viresh Kumar , Rikard Falkeborn Subject: [PATCH 2/3] firmware: arm_scmi: Constify ops pointers in scmi_handle Date: Mon, 7 Sep 2020 01:04:51 +0200 Message-Id: <20200906230452.33410-3-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 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org These are never modified, so make them const to allow drivers to make them const. Signed-off-by: Rikard Falkeborn --- include/linux/scmi_protocol.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/include/linux/scmi_protocol.h b/include/linux/scmi_protocol.h index 7e5dd7d1e221..05570afc7f74 100644 --- a/include/linux/scmi_protocol.h +++ b/include/linux/scmi_protocol.h @@ -279,12 +279,12 @@ struct scmi_notify_ops { struct scmi_handle { struct device *dev; struct scmi_revision_info *version; - struct scmi_perf_ops *perf_ops; - struct scmi_clk_ops *clk_ops; - struct scmi_power_ops *power_ops; - struct scmi_sensor_ops *sensor_ops; - struct scmi_reset_ops *reset_ops; - struct scmi_notify_ops *notify_ops; + const struct scmi_perf_ops *perf_ops; + const struct scmi_clk_ops *clk_ops; + const struct scmi_power_ops *power_ops; + const struct scmi_sensor_ops *sensor_ops; + const struct scmi_reset_ops *reset_ops; + const struct scmi_notify_ops *notify_ops; /* for protocol internal use */ void *perf_priv; void *clk_priv; From patchwork Sun Sep 6 23:04:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rikard Falkeborn X-Patchwork-Id: 11759773 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 95923618 for ; Sun, 6 Sep 2020 23:10:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7545C2151B for ; Sun, 6 Sep 2020 23:10:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="riMbjmEO" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726620AbgIFXKK (ORCPT ); Sun, 6 Sep 2020 19:10:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726490AbgIFXKH (ORCPT ); Sun, 6 Sep 2020 19:10:07 -0400 Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9BE7C061573; Sun, 6 Sep 2020 16:10:06 -0700 (PDT) Received: by mail-lj1-x244.google.com with SMTP id w3so13925479ljo.5; Sun, 06 Sep 2020 16:10:06 -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=fSaghmQzHJjk3kvUtDFN9SKS8X9oTbE2eDrEp3NKXxM=; b=riMbjmEOlyWNXfiYpGuR0zQVVyZfGKRhFnjQyEfC/xhGCzWUW2WBUPwj4SUyzL+ZlX Pdt0iFdEeSGQ3Ikr7bX4yoXGUH0MR9Cutrl5/IM4bN8ql3zpsNmBWDtzTJfYiyv+VIrm SVsbLA4vb+/I13KqEuwJJ/d8+ICyhu8wqOth8RpqLQW3M+XTwzpGFeiaoD5NKhxcoRYu ctcbbJsgRsKpaKF7kp6aBakq5BbK1cGvxFvKNbfOL5TkZU5iJcNsjQceOerUvbdGHNim ikZv7tNgbjSklO6eVIhhcg6cwtqa9KY2tpvcNa6uVH31nCDyYWHo2EhQXbE1kPzCjPKc VlCA== 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=fSaghmQzHJjk3kvUtDFN9SKS8X9oTbE2eDrEp3NKXxM=; b=IrbQBI8twmKwruETgc1oZHe/mYzkTUSXHTrknU01jItTEWLrOWAL+9lC3hUZ/+d8eR 2TGPR6a3NZL/YiXvzRMEOk8NhEbrvqKwFLf6gDIme5R2i3xEk9oEdW7mY0jm2i1jOSCr /Eh2Y07nxvnkZwuHVHq74/6UfTpvMTfOpoZm2xE0Nl/CaowY3xLX2ZIdJM9yoEfm/qHZ qEBd4tUh1uosnYP+IXj3EjeG4/ESenwKPjJhwQJvdNZH2Oa98a9l+aRA07v0VxV8l9oY Ru6nPg7N42sI/ajf2jj6yM1CvwTmMvt9TcV4iQjCCt6sBr85sjnU8inZad7cp+yoem/p uFbw== X-Gm-Message-State: AOAM531JmyFciRM30WmMB+uvBNBABc4G5BfEV/f9jW3wPQFNZe8jcaoK FTeBr3gvlJncNq3gSWnyGq0= X-Google-Smtp-Source: ABdhPJz6HMRnTs7MAyDfbAQ3Pozg9I5HcG3fQN6y8j86WDa0lCWucGIbq51C25feR4UgpI8QmbP/zg== X-Received: by 2002:a05:651c:209:: with SMTP id y9mr3567862ljn.398.1599433804629; Sun, 06 Sep 2020 16:10:04 -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.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 06 Sep 2020 16:10:03 -0700 (PDT) From: Rikard Falkeborn To: linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Sudeep Holla , "Rafael J. Wysocki" , Viresh Kumar , Rikard Falkeborn Subject: [PATCH 3/3] firmware: arm_scmi: Constify static scmi-ops Date: Mon, 7 Sep 2020 01:04:52 +0200 Message-Id: <20200906230452.33410-4-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 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org These are never modified, so make them const to allow the compiler to put them in read-only memory. Signed-off-by: Rikard Falkeborn --- drivers/firmware/arm_scmi/clock.c | 2 +- drivers/firmware/arm_scmi/common.h | 2 +- drivers/firmware/arm_scmi/mailbox.c | 2 +- drivers/firmware/arm_scmi/notify.c | 2 +- drivers/firmware/arm_scmi/perf.c | 2 +- drivers/firmware/arm_scmi/power.c | 2 +- drivers/firmware/arm_scmi/reset.c | 2 +- drivers/firmware/arm_scmi/sensors.c | 2 +- drivers/firmware/arm_scmi/smc.c | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/firmware/arm_scmi/clock.c b/drivers/firmware/arm_scmi/clock.c index 75e39882746e..a3b90be28009 100644 --- a/drivers/firmware/arm_scmi/clock.c +++ b/drivers/firmware/arm_scmi/clock.c @@ -318,7 +318,7 @@ scmi_clock_info_get(const struct scmi_handle *handle, u32 clk_id) return clk; } -static struct scmi_clk_ops clk_ops = { +static const struct scmi_clk_ops clk_ops = { .count_get = scmi_clock_count_get, .info_get = scmi_clock_info_get, .rate_get = scmi_clock_rate_get, diff --git a/drivers/firmware/arm_scmi/common.h b/drivers/firmware/arm_scmi/common.h index c113e578cc6c..233700a42bff 100644 --- a/drivers/firmware/arm_scmi/common.h +++ b/drivers/firmware/arm_scmi/common.h @@ -210,7 +210,7 @@ struct scmi_transport_ops { * @max_msg_size: Maximum size of data per message that can be handled. */ struct scmi_desc { - struct scmi_transport_ops *ops; + const struct scmi_transport_ops *ops; int max_rx_timeout_ms; int max_msg; int max_msg_size; diff --git a/drivers/firmware/arm_scmi/mailbox.c b/drivers/firmware/arm_scmi/mailbox.c index 6998dc86b5ce..cc2de207fe10 100644 --- a/drivers/firmware/arm_scmi/mailbox.c +++ b/drivers/firmware/arm_scmi/mailbox.c @@ -181,7 +181,7 @@ mailbox_poll_done(struct scmi_chan_info *cinfo, struct scmi_xfer *xfer) return shmem_poll_done(smbox->shmem, xfer); } -static struct scmi_transport_ops scmi_mailbox_ops = { +static const struct scmi_transport_ops scmi_mailbox_ops = { .chan_available = mailbox_chan_available, .chan_setup = mailbox_chan_setup, .chan_free = mailbox_chan_free, diff --git a/drivers/firmware/arm_scmi/notify.c b/drivers/firmware/arm_scmi/notify.c index 4731daaacd19..2754f9d01636 100644 --- a/drivers/firmware/arm_scmi/notify.c +++ b/drivers/firmware/arm_scmi/notify.c @@ -1421,7 +1421,7 @@ static void scmi_protocols_late_init(struct work_struct *work) * notify_ops are attached to the handle so that can be accessed * directly from an scmi_driver to register its own notifiers. */ -static struct scmi_notify_ops notify_ops = { +static const struct scmi_notify_ops notify_ops = { .register_event_notifier = scmi_register_notifier, .unregister_event_notifier = scmi_unregister_notifier, }; diff --git a/drivers/firmware/arm_scmi/perf.c b/drivers/firmware/arm_scmi/perf.c index 3e1e87012c95..a3e7b1bfab00 100644 --- a/drivers/firmware/arm_scmi/perf.c +++ b/drivers/firmware/arm_scmi/perf.c @@ -748,7 +748,7 @@ static bool scmi_fast_switch_possible(const struct scmi_handle *handle, return dom->fc_info && dom->fc_info->level_set_addr; } -static struct scmi_perf_ops perf_ops = { +static const struct scmi_perf_ops perf_ops = { .limits_set = scmi_perf_limits_set, .limits_get = scmi_perf_limits_get, .level_set = scmi_perf_level_set, diff --git a/drivers/firmware/arm_scmi/power.c b/drivers/firmware/arm_scmi/power.c index 46f213644c49..32bcf5821ea9 100644 --- a/drivers/firmware/arm_scmi/power.c +++ b/drivers/firmware/arm_scmi/power.c @@ -184,7 +184,7 @@ static char *scmi_power_name_get(const struct scmi_handle *handle, u32 domain) return dom->name; } -static struct scmi_power_ops power_ops = { +static const struct scmi_power_ops power_ops = { .num_domains_get = scmi_power_num_domains_get, .name_get = scmi_power_name_get, .state_set = scmi_power_state_set, diff --git a/drivers/firmware/arm_scmi/reset.c b/drivers/firmware/arm_scmi/reset.c index 3691bafca057..4e2dc5fc43d9 100644 --- a/drivers/firmware/arm_scmi/reset.c +++ b/drivers/firmware/arm_scmi/reset.c @@ -194,7 +194,7 @@ scmi_reset_domain_deassert(const struct scmi_handle *handle, u32 domain) return scmi_domain_reset(handle, domain, 0, ARCH_COLD_RESET); } -static struct scmi_reset_ops reset_ops = { +static const struct scmi_reset_ops reset_ops = { .num_domains_get = scmi_reset_num_domains_get, .name_get = scmi_reset_name_get, .latency_get = scmi_reset_latency_get, diff --git a/drivers/firmware/arm_scmi/sensors.c b/drivers/firmware/arm_scmi/sensors.c index 1af0ad362e82..7d83680198de 100644 --- a/drivers/firmware/arm_scmi/sensors.c +++ b/drivers/firmware/arm_scmi/sensors.c @@ -275,7 +275,7 @@ static int scmi_sensor_count_get(const struct scmi_handle *handle) return si->num_sensors; } -static struct scmi_sensor_ops sensor_ops = { +static const struct scmi_sensor_ops sensor_ops = { .count_get = scmi_sensor_count_get, .info_get = scmi_sensor_info_get, .trip_point_config = scmi_sensor_trip_point_config, diff --git a/drivers/firmware/arm_scmi/smc.c b/drivers/firmware/arm_scmi/smc.c index a1537d123e38..1a03c3ec0230 100644 --- a/drivers/firmware/arm_scmi/smc.c +++ b/drivers/firmware/arm_scmi/smc.c @@ -137,7 +137,7 @@ smc_poll_done(struct scmi_chan_info *cinfo, struct scmi_xfer *xfer) return shmem_poll_done(scmi_info->shmem, xfer); } -static struct scmi_transport_ops scmi_smc_ops = { +static const struct scmi_transport_ops scmi_smc_ops = { .chan_available = smc_chan_available, .chan_setup = smc_chan_setup, .chan_free = smc_chan_free,