netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Thiago Farina <tfransosi@gmail.com>,
	Andre Naujoks <nautsch2@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Steven Rostedt <rostedt@goodmis.org>,
	Rusty Russell <rusty@rustcorp.com.au>,
	Arnd Bergmann <arnd@arndb.de>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>,
	Jason Baron <jbaron@redhat.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux list <linux-kernel@vger.kernel.org>,
	linux-can@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH net 2/3] lib: introduce upper case hex ascii helpers
Date: Thu, 19 Sep 2013 11:38:29 +0200	[thread overview]
Message-ID: <523AC615.9020204@pengutronix.de> (raw)
In-Reply-To: <20130914213546.ae435cdd.akpm@linux-foundation.org>

[-- Attachment #1: Type: text/plain, Size: 1906 bytes --]

On 09/15/2013 06:35 AM, Andrew Morton wrote:
> On Sun, 15 Sep 2013 01:27:03 -0300 Thiago Farina <tfransosi@gmail.com> wrote:
> 
>> On Fri, Sep 13, 2013 at 2:37 PM, Andre Naujoks <nautsch2@gmail.com> 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 <nautsch2@gmail.com>
>>> ---
>>>  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?

Marc

-- 
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   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

  reply	other threads:[~2013-09-19  9:38 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-13 17:37 [PATCH net 0/3] SLCAN/SLIP fixes and performance Andre Naujoks
2013-09-13 17:37 ` [PATCH net 1/3] slip/slcan: added locking in wakeup function Andre Naujoks
2013-09-13 18:45   ` Oliver Hartkopp
2013-09-19  9:36   ` Marc Kleine-Budde
2013-09-19 10:29     ` Andre Naujoks
2013-09-19 10:35       ` Marc Kleine-Budde
2013-09-19 10:43         ` Peter Hurley
2013-09-13 17:37 ` [PATCH net 2/3] lib: introduce upper case hex ascii helpers Andre Naujoks
2013-09-15  4:27   ` Thiago Farina
2013-09-15  4:35     ` Andrew Morton
2013-09-19  9:38       ` Marc Kleine-Budde [this message]
2013-09-19  9:57         ` Oliver Hartkopp
2013-09-13 17:37 ` [PATCH net 3/3] slcan: rewrite of slc_bump and slc_encaps Andre Naujoks
2013-09-13 18:43   ` Oliver Hartkopp
2013-09-19  9:47   ` Marc Kleine-Budde
2013-09-14 10:45 ` [PATCH net 0/3] SLCAN/SLIP fixes and performance Marc Kleine-Budde
2013-09-14 11:22   ` Andre Naujoks
2013-09-20 19:39 ` David Miller

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=523AC615.9020204@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=jbaron@redhat.com \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=nautsch2@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=qca_vkondrat@qca.qualcomm.com \
    --cc=rostedt@goodmis.org \
    --cc=rusty@rustcorp.com.au \
    --cc=tfransosi@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).