From patchwork Wed Apr 3 12:43:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick McHardy X-Patchwork-Id: 2387061 Return-Path: X-Original-To: patchwork-linux-rdma@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 550F3DFB79 for ; Wed, 3 Apr 2013 12:54:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761253Ab3DCMy2 (ORCPT ); Wed, 3 Apr 2013 08:54:28 -0400 Received: from stinky.trash.net ([213.144.137.162]:48247 "EHLO stinky.trash.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759728Ab3DCMyB (ORCPT ); Wed, 3 Apr 2013 08:54:01 -0400 Received: from macbook.localnet.Speedport_W_723V_1_27_000 (unknown [127.0.0.1]) by stinky.trash.net (Postfix) with ESMTP id A299D9D2DE; Wed, 3 Apr 2013 14:43:39 +0200 (MEST) From: Patrick McHardy To: jon.maloy@ericsson.com Cc: allan.stephens@windriver.com, netdev@vger.kernel.org, roland@kernel.org, sean.hefty@intel.com, hal.rosenstock@gmail.com, linux-rdma@vger.kernel.org Subject: [PATCH 1/5] tipc: remove unused str2addr media callback Date: Wed, 3 Apr 2013 14:43:26 +0200 Message-Id: <1364993010-15515-2-git-send-email-kaber@trash.net> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1364993010-15515-1-git-send-email-kaber@trash.net> References: <1364993010-15515-1-git-send-email-kaber@trash.net> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org Signed-off-by: Patrick McHardy --- net/tipc/bearer.h | 2 -- net/tipc/eth_media.c | 20 -------------------- 2 files changed, 22 deletions(-) diff --git a/net/tipc/bearer.h b/net/tipc/bearer.h index 39f1192..cc2d74e 100644 --- a/net/tipc/bearer.h +++ b/net/tipc/bearer.h @@ -77,7 +77,6 @@ struct tipc_bearer; * @enable_bearer: routine which enables a bearer * @disable_bearer: routine which disables a bearer * @addr2str: routine which converts media address to string - * @str2addr: routine which converts media address from string * @addr2msg: routine which converts media address to protocol message area * @msg2addr: routine which converts media address from protocol message area * @bcast_addr: media address used in broadcasting @@ -94,7 +93,6 @@ struct tipc_media { int (*enable_bearer)(struct tipc_bearer *b_ptr); void (*disable_bearer)(struct tipc_bearer *b_ptr); int (*addr2str)(struct tipc_media_addr *a, char *str_buf, int str_size); - int (*str2addr)(struct tipc_media_addr *a, char *str_buf); int (*addr2msg)(struct tipc_media_addr *a, char *msg_area); int (*msg2addr)(struct tipc_media_addr *a, char *msg_area); struct tipc_media_addr bcast_addr; diff --git a/net/tipc/eth_media.c b/net/tipc/eth_media.c index 2132c1e..1bdc6df 100644 --- a/net/tipc/eth_media.c +++ b/net/tipc/eth_media.c @@ -302,25 +302,6 @@ static int eth_addr2str(struct tipc_media_addr *a, char *str_buf, int str_size) } /** - * eth_str2addr - convert string to Ethernet address - */ -static int eth_str2addr(struct tipc_media_addr *a, char *str_buf) -{ - char mac[ETH_ALEN]; - int r; - - r = sscanf(str_buf, "%02x:%02x:%02x:%02x:%02x:%02x", - (u32 *)&mac[0], (u32 *)&mac[1], (u32 *)&mac[2], - (u32 *)&mac[3], (u32 *)&mac[4], (u32 *)&mac[5]); - - if (r != ETH_ALEN) - return 1; - - eth_media_addr_set(a, mac); - return 0; -} - -/** * eth_str2addr - convert Ethernet address format to message header format */ static int eth_addr2msg(struct tipc_media_addr *a, char *msg_area) @@ -351,7 +332,6 @@ static struct tipc_media eth_media_info = { .enable_bearer = enable_bearer, .disable_bearer = disable_bearer, .addr2str = eth_addr2str, - .str2addr = eth_str2addr, .addr2msg = eth_addr2msg, .msg2addr = eth_msg2addr, .bcast_addr = { { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },