Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753186Ab3ISJiu (ORCPT ); Thu, 19 Sep 2013 05:38:50 -0400 Received: from metis.ext.pengutronix.de ([92.198.50.35]:55875 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751660Ab3ISJis (ORCPT ); Thu, 19 Sep 2013 05:38:48 -0400 Message-ID: <523AC615.9020204@pengutronix.de> Date: Thu, 19 Sep 2013 11:38:29 +0200 From: Marc Kleine-Budde User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130518 Icedove/17.0.5 MIME-Version: 1.0 To: Andrew Morton CC: 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> In-Reply-To: <20130914213546.ae435cdd.akpm@linux-foundation.org> X-Enigmail-Version: 1.5.2 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="iCfvD6NdlXDqSNQWCIEWBj2ED0Hj6bojK" X-SA-Exim-Connect-IP: 2001:6f8:1178:4:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2801 Lines: 80 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --iCfvD6NdlXDqSNQWCIEWBj2ED0Hj6bojK Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 09/15/2013 06:35 AM, Andrew Morton wrote: > On Sun, 15 Sep 2013 01:27:03 -0300 Thiago Farina = wrote: >=20 >> On Fri, Sep 13, 2013 at 2:37 PM, Andre Naujoks wr= ote: >>> To be able to use the hex ascii functions in case sensitive environme= nts >>> 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? >=20 > 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? Marc --=20 Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de | --iCfvD6NdlXDqSNQWCIEWBj2ED0Hj6bojK Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) Comment: Using GnuPG with Icedove - http://www.enigmail.net/ iEYEARECAAYFAlI6xhYACgkQjTAFq1RaXHOv7gCeOMtVME9HrIevxcjsvAegM6M4 EVEAoIiP1DZCuSmTQT9HpJBmvhUS65sh =mSZl -----END PGP SIGNATURE----- --iCfvD6NdlXDqSNQWCIEWBj2ED0Hj6bojK-- -- 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/