From: Stephen Boyd <swboyd@chromium.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org, patches@lists.linux.dev,
"Benson Leung" <bleung@chromium.org>,
chrome-platform@lists.linux.dev, linux-usb@vger.kernel.org,
"Pavan Holla" <pholla@chromium.org>,
"Abhishek Pandit-Subedi" <abhishekpandit@chromium.org>,
"Łukasz Bartosik" <ukaszb@chromium.org>
Subject: [PATCH 2/2] usb: typec: cros-ec-ucsi: Mark cros_ucsi_ops static/const
Date: Thu, 9 Jan 2025 14:06:53 -0800 [thread overview]
Message-ID: <20250109220655.1677506-3-swboyd@chromium.org> (raw)
In-Reply-To: <20250109220655.1677506-1-swboyd@chromium.org>
This structure isn't used outside this file and can be marked const so
that it gets moved to read-only memory.
Cc: Pavan Holla <pholla@chromium.org>
Cc: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
Cc: Łukasz Bartosik <ukaszb@chromium.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
---
drivers/usb/typec/ucsi/cros_ec_ucsi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/typec/ucsi/cros_ec_ucsi.c b/drivers/usb/typec/ucsi/cros_ec_ucsi.c
index 75646a8d55be..c605c8616726 100644
--- a/drivers/usb/typec/ucsi/cros_ec_ucsi.c
+++ b/drivers/usb/typec/ucsi/cros_ec_ucsi.c
@@ -133,7 +133,7 @@ static int cros_ucsi_sync_control(struct ucsi *ucsi, u64 cmd)
return ret;
}
-struct ucsi_operations cros_ucsi_ops = {
+static const struct ucsi_operations cros_ucsi_ops = {
.read_version = cros_ucsi_read_version,
.read_cci = cros_ucsi_read_cci,
.read_message_in = cros_ucsi_read_message_in,
--
https://chromeos.dev
next prev parent reply other threads:[~2025-01-09 22:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-09 22:06 [PATCH 0/2] usb: typec: cros-ec-ucsi: A couple small cleanups Stephen Boyd
2025-01-09 22:06 ` [PATCH 1/2] usb: typec: cros-ec-ucsi: Add newlines to printk messages Stephen Boyd
2025-01-10 13:41 ` Łukasz Bartosik
2025-01-09 22:06 ` Stephen Boyd [this message]
2025-01-10 13:47 ` [PATCH 2/2] usb: typec: cros-ec-ucsi: Mark cros_ucsi_ops static/const Łukasz Bartosik
2025-01-10 13:38 ` [PATCH 0/2] usb: typec: cros-ec-ucsi: A couple small cleanups Łukasz Bartosik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250109220655.1677506-3-swboyd@chromium.org \
--to=swboyd@chromium.org \
--cc=abhishekpandit@chromium.org \
--cc=bleung@chromium.org \
--cc=chrome-platform@lists.linux.dev \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=patches@lists.linux.dev \
--cc=pholla@chromium.org \
--cc=ukaszb@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox