From: Oliver Hartkopp <socketcan@hartkopp•net>
To: Marc Kleine-Budde <mkl@pengutronix•de>
Cc: Andrew Morton <akpm@linux-foundation•org>,
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:57:22 +0200 [thread overview]
Message-ID: <523ACA82.6070902@hartkopp.net> (raw)
In-Reply-To: <523AC615.9020204@pengutronix.de>
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 <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?
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
next prev parent reply other threads:[~2013-09-19 9:57 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
2013-09-19 9:57 ` Oliver Hartkopp [this message]
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=523ACA82.6070902@hartkopp.net \
--to=socketcan@hartkopp$(echo .)net \
--cc=akpm@linux-foundation$(echo .)org \
--cc=arnd@arndb$(echo .)de \
--cc=davem@davemloft$(echo .)net \
--cc=gregkh@linuxfoundation$(echo .)org \
--cc=jbaron@redhat$(echo .)com \
--cc=linux-can@vger$(echo .)kernel.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=mkl@pengutronix$(echo .)de \
--cc=mst@redhat$(echo .)com \
--cc=nautsch2@gmail$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=qca_vkondrat@qca$(echo .)qualcomm.com \
--cc=rostedt@goodmis$(echo .)org \
--cc=rusty@rustcorp$(echo .)com.au \
--cc=tfransosi@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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