From: Tilman Schmidt <tilman@imap.cc>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Subject: Re: [PATCH 11/12] drivers: isdn: use new hex_to_bin() method
Date: Fri, 19 Feb 2010 00:55:15 +0100 [thread overview]
Message-ID: <4B7DD363.4050402@imap.cc> (raw)
In-Reply-To: <1266519351-3218-12-git-send-email-andy.shevchenko@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1951 bytes --]
Am 18.02.2010 19:55 schrieb Andy Shevchenko:
> From: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
>
> Get rid of own implementation of hex_to_bin(). It requires to have hex_to_bin()
> introduced by one of previous path in series.
>
> Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
> ---
> drivers/isdn/gigaset/capi.c | 14 ++------------
> 1 files changed, 2 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/isdn/gigaset/capi.c b/drivers/isdn/gigaset/capi.c
> index 83c4e2f..72adcfb 100644
> --- a/drivers/isdn/gigaset/capi.c
> +++ b/drivers/isdn/gigaset/capi.c
> @@ -13,6 +13,7 @@
>
> #include "gigaset.h"
> #include <linux/ctype.h>
> +#include <linux/kernel.h>
> #include <linux/isdn/capilli.h>
> #include <linux/isdn/capicmd.h>
> #include <linux/isdn/capiutil.h>
You don't need to include kernel.h here, it's already included
from gigaset.h.
> @@ -169,17 +170,6 @@ static inline void ignore_cstruct_param(struct cardstate *cs, _cstruct param,
> }
>
> /*
> - * convert hex to binary
> - */
> -static inline u8 hex2bin(char c)
> -{
> - int result = c & 0x0f;
> - if (c & 0x40)
> - result += 9;
> - return result;
> -}
> -
> -/*
> * convert an IE from Gigaset hex string to ETSI binary representation
> * including length byte
> * return value: result length, -1 on error
> @@ -190,7 +180,7 @@ static int encode_ie(char *in, u8 *out, int maxlen)
> while (*in) {
> if (!isxdigit(in[0]) || !isxdigit(in[1]) || l >= maxlen)
> return -1;
> - out[++l] = (hex2bin(in[0]) << 4) + hex2bin(in[1]);
> + out[++l] = (hex_to_bin(in[0]) << 4) + hex_to_bin(in[1]);
> in += 2;
> }
> out[0] = l;
Otherwise, fine with me.
Thanks,
Tilman
--
Tilman Schmidt E-Mail: tilman@imap.cc
Bonn, Germany
Diese Nachricht besteht zu 100% aus wiederverwerteten Bits.
Ungeöffnet mindestens haltbar bis: (siehe Rückseite)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]
next prev parent reply other threads:[~2010-02-18 23:56 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-18 18:55 [PATCH 00/12] Clean up code to use native kernel functions when convert or check hex digits Andy Shevchenko
2010-02-18 18:55 ` [PATCH 01/12] isdn: remove ishexdigit() in regard to isxdigit() Andy Shevchenko
2010-02-18 18:55 ` [PATCH 02/12] audit: use kernel's method to get byte in hex form Andy Shevchenko
2010-02-18 18:55 ` [PATCH 03/12] staging: remove unused methods Andy Shevchenko
2010-02-18 18:55 ` [PATCH 04/12] scsi: ibmmca: use kernel native convertor Andy Shevchenko
2010-02-18 18:55 ` [PATCH 05/12] lib: introduce common method to convert hex digits Andy Shevchenko
2010-02-18 18:55 ` [PATCH 06/12] drivers: net: optimize hex2bin() Andy Shevchenko
2010-02-18 18:55 ` [PATCH 07/12] usb: atm: speedtch: use new hex_to_bin() method Andy Shevchenko
2010-02-18 18:55 ` [PATCH 08/12] net: " Andy Shevchenko
2010-02-18 18:55 ` [PATCH 09/12] drivers: net: use kernel's method to get byte in hex form Andy Shevchenko
2010-02-18 18:55 ` [PATCH 10/12] drivers: net: use new hex_to_bin() method Andy Shevchenko
2010-02-18 18:55 ` [PATCH 11/12] drivers: isdn: " Andy Shevchenko
2010-02-18 18:55 ` [PATCH 12/12] drivers: wireless: use kernel's method to get byte in hex form Andy Shevchenko
2010-02-18 23:55 ` Tilman Schmidt [this message]
2010-02-19 9:53 ` [PATCHv2] drivers: isdn: use new hex_to_bin() method Andy Shevchenko
2010-02-19 14:53 ` [PATCH 03/12] staging: remove unused methods Greg KH
2010-02-22 20:21 ` [PATCH 02/12] audit: use kernel's method to get byte in hex form Eric Paris
2010-02-22 21:18 ` Andy Shevchenko
2010-02-18 23:36 ` [PATCH 01/12] isdn: remove ishexdigit() in regard to isxdigit() Tilman Schmidt
2010-02-19 11:41 ` [PATCH 00/12] Clean up code to use native kernel functions when convert or check hex digits Andy Shevchenko
2010-02-19 23:44 ` Tilman Schmidt
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=4B7DD363.4050402@imap.cc \
--to=tilman@imap.cc \
--cc=andy.shevchenko@gmail.com \
--cc=ext-andriy.shevchenko@nokia.com \
--cc=linux-kernel@vger.kernel.org \
/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