[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZL6KcmKWCI3BtfUn@corigine.com>
Date: Mon, 24 Jul 2023 16:28:02 +0200
From: Simon Horman <simon.horman@...igine.com>
To: Breno Leitao <leitao@...ian.org>
Cc: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, leit@...a.com,
Petr Mladek <pmladek@...e.com>,
"open list:NETWORKING DRIVERS" <netdev@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next 2/2] netconsole: Use kstrtobool() instead of
kstrtoint()
On Fri, Jul 21, 2023 at 02:21:45AM -0700, Breno Leitao wrote:
> Replace kstrtoint() by kstrtobool() in the sysfs _store() functions.
> This improves the user usability and simplify the code.
>
> With this fix, it is now possible to use [YyNn] to set and unset a
> feature. Old behaviour is still unchanged.
>
> kstrtobool() is also safer and doesn't need the extra validation that
> is required when converting a string to bool (end field in the struct),
> which makes the code simpler.
>
> Suggested-by: Petr Mladek <pmladek@...e.com>
> Signed-off-by: Breno Leitao <leitao@...ian.org>
Reviewed-by: Simon Horman <simon.horman@...igine.com>
Powered by blists - more mailing lists