From: Lyude Paul <lyude@redhat.com>
To: Thomas Zimmermann <tzimmermann@suse.de>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Cc: "Miguel Ojeda" <ojeda@kernel.org>,
"Alex Gaynor" <alex.gaynor@gmail.com>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
"Danilo Krummrich" <dakr@kernel.org>,
rust-for-linux@vger.kernel.org (open
list:RUST:Keyword:b(?i:rust)b)
Subject: [PATCH] iosys_map: Make dst a const in iosys_map_memcpy_to()
Date: Thu, 16 Oct 2025 16:24:55 -0400 [thread overview]
Message-ID: <20251016202455.2750217-1-lyude@redhat.com> (raw)
A drive-by fix I discovered when writing up bindings for iosys_mem for
rust: while iosys_map_memcpy_to() does modify the memory pointed to by the
iosys_map, it doesn't modify the actual iosys_map struct at all.
As such, let's add a const qualifier to this function.
Signed-off-by: Lyude Paul <lyude@redhat.com>
---
include/linux/iosys-map.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/iosys-map.h b/include/linux/iosys-map.h
index 3e85afe794c0a..0ececbba04b3a 100644
--- a/include/linux/iosys-map.h
+++ b/include/linux/iosys-map.h
@@ -278,7 +278,7 @@ static inline void iosys_map_clear(struct iosys_map *map)
* system memory. Depending on the buffer's location, the helper picks the
* correct method of accessing the memory.
*/
-static inline void iosys_map_memcpy_to(struct iosys_map *dst, size_t dst_offset,
+static inline void iosys_map_memcpy_to(const struct iosys_map *dst, size_t dst_offset,
const void *src, size_t len)
{
if (dst->is_iomem)
base-commit: 3a8660878839faadb4f1a6dd72c3179c1df56787
--
2.51.0
next reply other threads:[~2025-10-16 20:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-16 20:24 Lyude Paul [this message]
2025-10-17 7:45 ` [PATCH] iosys_map: Make dst a const in iosys_map_memcpy_to() Thomas Zimmermann
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=20251016202455.2750217-1-lyude@redhat.com \
--to=lyude@redhat.com \
--cc=a.hindborg@kernel.org \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=gary@garyguo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tmgross@umich.edu \
--cc=tzimmermann@suse.de \
/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;
as well as URLs for NNTP newsgroup(s).