All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Ido Schimmel' <idosch@idosch.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"nikolay@nvidia.com" <nikolay@nvidia.com>,
	"roopa@nvidia.com" <roopa@nvidia.com>,
	"bernard@vivo.com" <bernard@vivo.com>,
	"mlxsw@nvidia.com" <mlxsw@nvidia.com>,
	Ido Schimmel <idosch@nvidia.com>
Subject: RE: [PATCH net-next] net: bridge: Allow base 16 inputs in sysfs
Date: Wed, 24 Nov 2021 12:55:33 +0000	[thread overview]
Message-ID: <03c0d0b106954d24aba1f7417a41349f@AcuMS.aculab.com> (raw)
In-Reply-To: <20211124101122.3321496-1-idosch@idosch.org>

From: Ido Schimmel
> Sent: 24 November 2021 10:11
>
> Cited commit converted simple_strtoul() to kstrtoul() as suggested by
> the former's documentation. However, it also forced all the inputs to be
> decimal resulting in user space breakage.
> 
> Fix by setting the base to '0' so that the base is automatically
> detected.

Do both functions ignore leading whitespace?

I recently had to fix some code that did:
	if (write(sys_class_led_fd, on ? "255" : "  0", 3) != 3)
		return error.
I'm pretty sure I'd tested it before and it worked ok.
But I had to use "000" with a later kernel.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)


  parent reply	other threads:[~2021-11-24 12:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-24 10:11 [PATCH net-next] net: bridge: Allow base 16 inputs in sysfs Ido Schimmel
2021-11-24 10:17 ` Nikolay Aleksandrov
2021-11-24 12:55 ` David Laight [this message]
2021-11-24 13:16   ` Ido Schimmel
2021-11-25  1:30 ` patchwork-bot+netdevbpf

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=03c0d0b106954d24aba1f7417a41349f@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=bernard@vivo.com \
    --cc=davem@davemloft.net \
    --cc=idosch@idosch.org \
    --cc=idosch@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=mlxsw@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@nvidia.com \
    --cc=roopa@nvidia.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.