[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7708fc8b-738c-4d58-b89e-801ce6a4832a@gmx.com>
Date: Sun, 7 Jan 2024 07:28:27 +1030
From: Qu Wenruo <quwenruo.btrfs@....com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Qu Wenruo <wqu@...e.com>
Cc: linux-btrfs@...r.kernel.org, linux-kernel@...r.kernel.org,
akpm@...ux-foundation.org, christophe.jaillet@...adoo.fr,
David.Laight@...lab.com, ddiss@...e.de, geert@...ux-m68k.org
Subject: Re: [PATCH v3 0/4] kstrtox: introduce memparse_safe()
On 2024/1/7 01:04, Andy Shevchenko wrote:
> On Thu, Jan 04, 2024 at 09:57:47AM +1030, Qu Wenruo wrote:
>> [CHANGELOG]
>> v3:
>> - Fix the 32bit pointer pattern in the test case
>> The old pointer pattern for 32 bit systems is in fact 40 bits,
>> which would still lead to sparse warning.
>> The newer pattern is using UINTPTR_MAX to trim the pattern, then
>> converted to a pointer, which should not cause any trimmed bits and
>> make sparse happy.
>
> Having test cases is quite good, thanks!
> But as I understood what Alexey wanted, is not using the kstrtox files for this.
> You can introduce it in the cmdline.c, correct? Just include local "kstrtox.h".
Not really possible, all the needed parsing helpers are internal inside
kstrtox.c.
Furthermore, this also means memparse() can not be enhanced due to:
- Lack of ways to return errors
- Unable to call the parsing helpers inside cmdline.c
Thanks,
Qu
>
> I'm on leave till end of the month, I'll look at this later.
>
Powered by blists - more mailing lists