From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: "David S. Miller" <davem@davemloft.net>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>,
Chas Williams <chas@cmf.nrl.navy.mil>,
linux-atm-general@lists.sourceforge.net
Subject: [PATCH 1/5] drivers: atm: don't use private copy of hex_to_bin()
Date: Fri, 23 Jul 2010 16:18:06 +0300 [thread overview]
Message-ID: <244718f934418c4a183e91e333de95ed07c501d4.1279890832.git.andy.shevchenko@gmail.com> (raw)
In-Reply-To: <cover.1279890832.git.andy.shevchenko@gmail.com>
In-Reply-To: <cover.1279890832.git.andy.shevchenko@gmail.com>
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/nicstar.c | 15 ++-------------
1 files changed, 2 insertions(+), 13 deletions(-)
diff --git a/drivers/atm/nicstar.c b/drivers/atm/nicstar.c
index 729a149..2f3516b 100644
--- a/drivers/atm/nicstar.c
+++ b/drivers/atm/nicstar.c
@@ -154,7 +154,6 @@ static void which_list(ns_dev * card, struct sk_buff *skb);
#endif
static void ns_poll(unsigned long arg);
static int ns_parse_mac(char *mac, unsigned char *esi);
-static short ns_h2i(char c);
static void ns_phy_put(struct atm_dev *dev, unsigned char value,
unsigned long addr);
static unsigned char ns_phy_get(struct atm_dev *dev, unsigned long addr);
@@ -2824,9 +2823,9 @@ static int ns_parse_mac(char *mac, unsigned char *esi)
return -1;
j = 0;
for (i = 0; i < 6; i++) {
- if ((byte1 = ns_h2i(mac[j++])) < 0)
+ if ((byte1 = hex_to_bin(mac[j++])) < 0)
return -1;
- if ((byte0 = ns_h2i(mac[j++])) < 0)
+ if ((byte0 = hex_to_bin(mac[j++])) < 0)
return -1;
esi[i] = (unsigned char)(byte1 * 16 + byte0);
if (i < 5) {
@@ -2837,16 +2836,6 @@ static int ns_parse_mac(char *mac, unsigned char *esi)
return 0;
}
-static short ns_h2i(char c)
-{
- if (c >= '0' && c <= '9')
- return (short)(c - '0');
- if (c >= 'A' && c <= 'F')
- return (short)(c - 'A' + 10);
- if (c >= 'a' && c <= 'f')
- return (short)(c - 'a' + 10);
- return -1;
-}
static void ns_phy_put(struct atm_dev *dev, unsigned char value,
unsigned long addr)
--
1.7.1.1
next prev parent reply other threads:[~2010-07-23 13:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-23 13:18 [PATCH 0/5] remove custom implementation " Andy Shevchenko
2010-07-23 13:18 ` Andy Shevchenko [this message]
2010-07-23 19:51 ` [PATCH 1/5] drivers: atm: don't use private copy " David Miller
2010-07-23 13:18 ` [PATCH 2/5] drivers: net: use newly introduced hex_to_bin() Andy Shevchenko
2010-07-23 19:51 ` David Miller
2010-07-23 13:18 ` [PATCH 3/5] usb: usbnet: " Andy Shevchenko
2010-07-23 19:51 ` David Miller
2010-07-23 13:18 ` [PATCH 4/5] wireless: " Andy Shevchenko
2010-07-26 18:27 ` John W. Linville
2010-07-23 13:18 ` [PATCH 5/5] net: core: don't use own hex_to_bin() method Andy Shevchenko
2010-07-23 19:51 ` 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=244718f934418c4a183e91e333de95ed07c501d4.1279890832.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
all inboxes | Powered by JetHome®