From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: linux-kernel@vger.kernel.org, Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 1/2] lib: make TOLOWER macro public
Date: Mon, 18 Jul 2011 13:36:29 +0300 [thread overview]
Message-ID: <1310985389.3903.0.camel@smile> (raw)
In-Reply-To: <CACVxJT8P_0VcL6f40GixgrvYjh1TBaVwdGwHH3VatG+87mMHHg@mail.gmail.com>
On Mon, 2011-07-18 at 13:25 +0300, Alexey Dobriyan wrote:
> NAK
> This macro sucks because name doesn't reflect hackish nature.
> _tolower() should be moved into public header.
>
Makes sense. I think whole _tolower() could be moved to kernel.h.
> On Mon, Jul 18, 2011 at 11:23 AM, Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> > This macro is required by *printf and kstrto* functions that are located
> > in the different modules. This patch makes TOLOWER macro public.
> > However, it's good idea to not use the macro outside of mentioned
> > functions.
>
> > --- a/include/linux/kernel.h
> > +++ b/include/linux/kernel.h
>
> > +/* Works only for digits and letters, but small and fast */
> > +#define TOLOWER(x) ((x) | 0x20)
>
> > --- a/lib/kstrtox.c
> > +++ b/lib/kstrtox.c
> > @@ -19,11 +19,6 @@
> > #include <linux/types.h>
> > #include <asm/uaccess.h>
> >
> > -static inline char _tolower(const char c)
> > -{
> > - return c | 0x20;
> > -}
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
prev parent reply other threads:[~2011-07-18 10:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-18 8:23 [PATCH 1/2] lib: make TOLOWER macro public Andy Shevchenko
2011-07-18 8:23 ` [PATCH 2/2] lib: call native hex_to_bin() inside _kstrtoull() Andy Shevchenko
2011-07-18 10:31 ` Alexey Dobriyan
2011-07-18 10:39 ` Andy Shevchenko
2011-07-18 12:57 ` [PATCHv2 1/2] lib: make _tolower() public Andy Shevchenko
2011-07-18 12:57 ` [PATCHv2 2/2] lib: kstrtox: add performance test case Andy Shevchenko
2011-07-18 20:52 ` [PATCHv2 1/2] lib: make _tolower() public Alexey Dobriyan
2011-07-19 7:17 ` [PATCHv2.1] " Andy Shevchenko
2011-07-18 19:05 ` [PATCH 2/2] lib: call native hex_to_bin() inside _kstrtoull() Andy Shevchenko
2011-07-18 10:25 ` [PATCH 1/2] lib: make TOLOWER macro public Alexey Dobriyan
2011-07-18 10:36 ` Andy Shevchenko [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=1310985389.3903.0.camel@smile \
--to=andriy.shevchenko@linux.intel.com \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
/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