netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv1.5 1/3] drivers: atm: use native kernel's hex_to_bin() func
@ 2010-09-21  6:40 Andy Shevchenko
  2010-09-21  6:40 ` [PATCHv1.5 2/3] sunrpc/cache: don't use custom hex_to_bin() converter Andy Shevchenko
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Andy Shevchenko @ 2010-09-21  6:40 UTC (permalink / raw)
  To: linux-kernel
  Cc: David S. Miller, netdev, Andy Shevchenko, Chas Williams,
	linux-atm-general

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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-09-22 19:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-21  6:40 [PATCHv1.5 1/3] drivers: atm: use native kernel's hex_to_bin() func Andy Shevchenko
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

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