From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756118Ab1GRKg7 (ORCPT ); Mon, 18 Jul 2011 06:36:59 -0400 Received: from mga03.intel.com ([143.182.124.21]:39558 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751322Ab1GRKg6 convert rfc822-to-8bit (ORCPT ); Mon, 18 Jul 2011 06:36:58 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.67,221,1309762800"; d="scan'208";a="28389135" Subject: Re: [PATCH 1/2] lib: make TOLOWER macro public From: Andy Shevchenko To: Alexey Dobriyan Cc: linux-kernel@vger.kernel.org, Andrew Morton In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Organization: Intel Finland Oy Date: Mon, 18 Jul 2011 13:36:29 +0300 Message-ID: <1310985389.3903.0.camel@smile> Mime-Version: 1.0 X-Mailer: Evolution 2.32.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > 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 > > #include > > > > -static inline char _tolower(const char c) > > -{ > > - return c | 0x20; > > -} -- Andy Shevchenko Intel Finland Oy