From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH] usb: gadget: Use put_unaligned_le16() from asm/unaligned.h
Date: Mon, 13 Apr 2026 21:51:24 +0200 [thread overview]
Message-ID: <20260413195124.2910057-1-s.hauer@pengutronix.de> (raw)
usbstring.c has its own put_unaligned_le16() function instead of using
the existing one from asm/unaligned.h. This was never a problem, but
since 87d3ae4bee ("filetype: fix unaligned access for x86_linux_bootimage")
the conflicting definition from asm/unaligned.h leaks in which results
in a failed build. Drop the duplicate function and explicitly include
the correct definition.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/usb/gadget/usbstring.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/usb/gadget/usbstring.c b/drivers/usb/gadget/usbstring.c
index 58eb28ad1a..209a3d01d8 100644
--- a/drivers/usb/gadget/usbstring.c
+++ b/drivers/usb/gadget/usbstring.c
@@ -8,12 +8,7 @@
#include <linux/usb/ch9.h>
#include <linux/usb/gadget.h>
-
-static inline void put_unaligned_le16(u16 val, u8 *p)
-{
- *p++ = val;
- *p++ = val >> 8;
-}
+#include <asm/unaligned.h>
static int utf8_to_utf16le(const char *s, __le16 *cp, unsigned len)
{
--
2.47.3
next reply other threads:[~2026-04-13 19:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-13 19:51 Sascha Hauer [this message]
2026-04-14 8:38 ` Ahmad Fatoum
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=20260413195124.2910057-1-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.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