Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753432Ab3ISJ5o (ORCPT ); Thu, 19 Sep 2013 05:57:44 -0400 Received: from mo-p00-ob.rzone.de ([81.169.146.160]:18256 "EHLO mo-p00-ob.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753270Ab3ISJ5l (ORCPT ); Thu, 19 Sep 2013 05:57:41 -0400 X-RZG-AUTH: :P2MHfkW8eP4Mre39l357AZT/I7AY/7nT2yrT1q0ngWNsKR9DbcbmpiO4kpRCxejnXg== X-RZG-CLASS-ID: mo00 Message-ID: <523ACA82.6070902@hartkopp.net> Date: Thu, 19 Sep 2013 11:57:22 +0200 From: Oliver Hartkopp User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130820 Icedove/17.0.8 MIME-Version: 1.0 To: Marc Kleine-Budde CC: Andrew Morton , Thiago Farina , Andre Naujoks , "David S. Miller" , Steven Rostedt , Rusty Russell , Arnd Bergmann , "Michael S. Tsirkin" , Vladimir Kondratiev , Jason Baron , Greg Kroah-Hartman , linux list , linux-can@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH net 2/3] lib: introduce upper case hex ascii helpers References: <1379093833-4949-1-git-send-email-nautsch2@gmail.com> <1379093833-4949-3-git-send-email-nautsch2@gmail.com> <20130914213546.ae435cdd.akpm@linux-foundation.org> <523AC615.9020204@pengutronix.de> In-Reply-To: <523AC615.9020204@pengutronix.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2096 Lines: 56 On 19.09.2013 11:38, Marc Kleine-Budde wrote: > On 09/15/2013 06:35 AM, Andrew Morton wrote: >> On Sun, 15 Sep 2013 01:27:03 -0300 Thiago Farina wrote: >> >>> On Fri, Sep 13, 2013 at 2:37 PM, Andre Naujoks wrote: >>>> To be able to use the hex ascii functions in case sensitive environments >>>> the array hex_asc_upper[] and the needed functions for hex_byte_pack_upper() >>>> are introduced. >>>> >>>> Signed-off-by: Andre Naujoks >>>> --- >>>> include/linux/kernel.h | 11 +++++++++++ >>>> lib/hexdump.c | 2 ++ >>>> 2 files changed, 13 insertions(+) >>>> >>>> diff --git a/include/linux/kernel.h b/include/linux/kernel.h >>>> index 482ad2d..672ddc4 100644 >>>> --- a/include/linux/kernel.h >>>> +++ b/include/linux/kernel.h >>>> @@ -439,6 +439,17 @@ static inline char *hex_byte_pack(char *buf, u8 byte) >>>> return buf; >>>> } >>>> >>>> +extern const char hex_asc_upper[]; >>>> +#define hex_asc_upper_lo(x) hex_asc_upper[((x) & 0x0f)] >>>> +#define hex_asc_upper_hi(x) hex_asc_upper[((x) & 0xf0) >> 4] >>> Does using a macro instead of a real function (static inline) >>> generates a better code? >> >> Yes, a static inline would be nicer, but these are derived from >> hex_asc_lo/hex_asc_hi. If we change one we should change the other >> and that becomes a separate cleanup. So I think this patch is >> OK as-is. > > Is this an Acked-by? > >> Also, it would make sense to get all the *hex* stuff out of kernel.h >> and into a new header file (hexchar.h?). They're a clean >> self-contained thing and kernel.h is rather a dumping ground. > > Who is taking this series? Andre suggested that Dave Miller could take these three patches for 3.12 as they are mainly network fixes: http://marc.info/?l=linux-can&m=137909384116115&w=2 Regards, Oliver -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/