linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tilman Schmidt <tilman@imap.cc>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: linux-kernel@vger.kernel.org,
	Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Subject: Re: [PATCH 02/11] drivers: isdn: use new hex_to_bin() method
Date: Mon, 22 Feb 2010 22:22:44 +0100	[thread overview]
Message-ID: <4B82F5A4.1010901@imap.cc> (raw)
In-Reply-To: <5627f8a3ddb2d746e58409d1d59338a99b77291a.1266861291.git.ext-andriy.shevchenko@nokia.com>

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

Am 22.02.2010 19:09 schrieb Andy Shevchenko:
> From: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
> 
> Get rid of own implementation of hex_to_bin().
> 
> Please note it requires to have hex_to_bin() introduced by one of previous
> patch [1] which is not applied yet.
> 
> [1] http://patchwork.kernel.org/patch/80404/
> 
> Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
> Cc: Tilman Schmidt <tilman@imap.cc>

Acked-by: Tilman Schmidt <tilman@imap.cc>

> ---
>  drivers/isdn/gigaset/capi.c |   13 +------------
>  1 files changed, 1 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/isdn/gigaset/capi.c b/drivers/isdn/gigaset/capi.c
> index 3f5cd06..532ca33 100644
> --- a/drivers/isdn/gigaset/capi.c
> +++ b/drivers/isdn/gigaset/capi.c
> @@ -183,17 +183,6 @@ static inline int ishexdigit(char c)
>  }
>  
>  /*
> - * 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
> @@ -204,7 +193,7 @@ static int encode_ie(char *in, u8 *out, int maxlen)
>  	while (*in) {
>  		if (!ishexdigit(in[0]) || !ishexdigit(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;

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

  parent reply	other threads:[~2010-02-22 21:24 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-22 18:08 [PATCH 00/11] Introduce common hex_to_bin() helper Andy Shevchenko
2010-02-22 18:09 ` [PATCH 01/11] lib: introduce common method to convert hex digits Andy Shevchenko
2010-02-22 18:09   ` [PATCH 02/11] drivers: isdn: use new hex_to_bin() method Andy Shevchenko
2010-02-22 18:09     ` [PATCH 03/11] drivers: net: optimize hex2bin() Andy Shevchenko
2010-02-22 18:09       ` [PATCH 04/11] usb: atm: speedtch: use new hex_to_bin() method Andy Shevchenko
2010-02-22 18:09         ` [PATCH 05/11] drivers: net: " Andy Shevchenko
2010-02-22 18:09           ` [PATCH 06/11] " Andy Shevchenko
2010-02-22 18:09             ` [PATCH 07/11] sysctl: don't use own implementation of hex_to_bin() Andy Shevchenko
2010-02-22 18:09               ` [PATCH 08/11] staging: rt2860: use new hex_to_bin() method Andy Shevchenko
2010-02-22 18:09                 ` [PATCH 09/11] fs: ldm: don't use own implementation of hex_to_bin() Andy Shevchenko
2010-02-22 18:09                   ` [PATCH 10/11] drivers: wireless: use new hex_to_bin() method Andy Shevchenko
2010-02-22 18:09                     ` [PATCH 11/11] drivers: acpi: don't use own implementation of hex_to_bin() Andy Shevchenko
2010-03-01 23:06       ` [PATCH 03/11] drivers: net: optimize hex2bin() Geoff Levand
2010-03-02  7:59         ` [PATCHv2] " Andy Shevchenko
2010-03-02 16:04           ` Geoff Levand
2010-03-03 22:02             ` Geoff Levand
2010-02-22 21:22     ` Tilman Schmidt [this message]
2010-03-09  1:03   ` [PATCH 01/11] lib: introduce common method to convert hex digits Andy Shevchenko
2010-03-09 19:57     ` Andrew Morton
2010-04-22  8:39       ` Andy Shevchenko
2010-04-29 22:11         ` Andrew Morton

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=4B82F5A4.1010901@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;
as well as URLs for NNTP newsgroup(s).