netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] drivers: atm: use native kernel's hex_to_bin() func
@ 2010-09-20 23:27 Andy Shevchenko
  2010-09-20 23:27 ` [PATCH 2/3] sunrpc/cache: don't use custom hex_to_bin() converter Andy Shevchenko
  2010-09-20 23:27 ` [PATCH 3/3] net: core: use kernel's converter from hex to bin Andy Shevchenko
  0 siblings, 2 replies; 3+ messages in thread
From: Andy Shevchenko @ 2010-09-20 23:27 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..dbce700 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] 3+ messages in thread

end of thread, other threads:[~2010-09-20 23:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-20 23:27 [PATCH 1/3] drivers: atm: use native kernel's hex_to_bin() func Andy Shevchenko
2010-09-20 23:27 ` [PATCH 2/3] sunrpc/cache: don't use custom hex_to_bin() converter Andy Shevchenko
2010-09-20 23:27 ` [PATCH 3/3] net: core: use kernel's converter from hex to bin Andy Shevchenko

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