Re: [PATCH 1/2] lib: make TOLOWER macro public

From: Alexey Dobriyan
Date: Mon Jul 18 2011 - 06:25:23 EST


NAK
This macro sucks because name doesn't reflect hackish nature.
_tolower() should be moved into public header.

On Mon, Jul 18, 2011 at 11:23 AM, Andy Shevchenko
<andriy.shevchenko@xxxxxxxxxxxxxxx> 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;
> -}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/