mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>,
	Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH] usb: gadget: Use put_unaligned_le16() from asm/unaligned.h
Date: Tue, 14 Apr 2026 10:38:36 +0200	[thread overview]
Message-ID: <8071f55f-4c93-44bc-8dba-d3c8c083c3b1@pengutronix.de> (raw)
In-Reply-To: <20260413195124.2910057-1-s.hauer@pengutronix.de>



On 4/13/26 9:51 PM, Sascha Hauer wrote:
> 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>

Reviewed-by: Ahmad Fatoum <a.fatoum@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)
>  {

-- 
Pengutronix e.K.                  |                             |
Steuerwalder Str. 21              | http://www.pengutronix.de/  |
31137 Hildesheim, Germany         | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |




      reply	other threads:[~2026-04-14  8:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-13 19:51 Sascha Hauer
2026-04-14  8:38 ` Ahmad Fatoum [this message]

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=8071f55f-4c93-44bc-8dba-d3c8c083c3b1@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.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