Re: [PATCH v1 1/2] kernel.h: Update comment about simple_strto<foo>() functions
From: Andy Shevchenko
Date: Thu Jun 20 2019 - 09:47:49 EST
On Thu, Jun 20, 2019 at 03:14:20PM +0200, Miguel Ojeda wrote:
> On Wed, Jun 19, 2019 at 6:38 PM Andy Shevchenko
> <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
> >
> > There were discussions in the past about use cases for
> > simple_strto<foo>() functions and in some rare cases they have a benefit
> > on kstrto<foo>() ones.
> >
> > Update a comment to reduce confusing about special use cases.
>
> I don't recall the discussions anymore... :-) But are we sure
> simple_strtoul() etc. are not obsolete anymore and want to use them
> again?
As I'm explaining there, making them obsolete without providing an alternative
was a not the best move. So, until we have no alternative and, as I pointed
out, we see the patches moving back to simple_strto*() from kstrto*(),
simple_strto*() may be used in some corner cases.
The code in charlcd.c shows a down side of people taking that "obsolete" word
too seriously. Instead of one old good function we have to replicate it many
times.
P.S. Despite the whatever decision will be made on this patch, the second one
makes sense on its own.
--
With Best Regards,
Andy Shevchenko