From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org,
Andy Shevchenko <andy.shevchenko@gmail.com>,
Chas Williams <chas@cmf.nrl.navy.mil>,
linux-atm-general@lists.sourceforge.net
Subject: [PATCHv1.5 1/3] drivers: atm: use native kernel's hex_to_bin() func
Date: Tue, 21 Sep 2010 09:40:24 +0300 [thread overview]
Message-ID: <2d00b66224535ae82be1a1e638b86b81fb890f58.1285051188.git.andy.shevchenko@gmail.com> (raw)
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Chas Williams <chas@cmf.nrl.navy.mil>
Cc: linux-atm-general@lists.sourceforge.net
---
drivers/atm/horizon.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/atm/horizon.c b/drivers/atm/horizon.c
index 54720ba..a957904 100644
--- a/drivers/atm/horizon.c
+++ b/drivers/atm/horizon.c
@@ -1645,10 +1645,8 @@ static int hrz_send (struct atm_vcc * atm_vcc, struct sk_buff * skb) {
unsigned short d = 0;
char * s = skb->data;
if (*s++ == 'D') {
- for (i = 0; i < 4; ++i) {
- d = (d<<4) | ((*s <= '9') ? (*s - '0') : (*s - 'a' + 10));
- ++s;
- }
+ for (i = 0; i < 4; ++i)
+ d = (d << 4) | hex_to_bin(*s++);
PRINTK (KERN_INFO, "debug bitmap is now %hx", debug = d);
}
}
--
1.7.2.2
next reply other threads:[~2010-09-21 6:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-21 6:40 Andy Shevchenko [this message]
2010-09-21 6:40 ` [PATCHv1.5 2/3] sunrpc/cache: don't use custom hex_to_bin() converter Andy Shevchenko
[not found] ` <9ff9c1f334999e0128fe6426aaad4e9d465f310f.1285051188.git.andy.shevchenko-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2010-09-22 1:08 ` David Miller
2010-09-22 19:03 ` J. Bruce Fields
2010-09-21 6:40 ` [PATCHv1.5 3/3] net: core: use kernel's converter from hex to bin Andy Shevchenko
2010-09-22 1:08 ` David Miller
2010-09-22 1:07 ` [PATCHv1.5 1/3] drivers: atm: use native kernel's hex_to_bin() func 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=2d00b66224535ae82be1a1e638b86b81fb890f58.1285051188.git.andy.shevchenko@gmail.com \
--to=andy.shevchenko@gmail.com \
--cc=chas@cmf.nrl.navy.mil \
--cc=davem@davemloft.net \
--cc=linux-atm-general@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@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).