From patchwork Thu May 7 07:47:38 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yang Hongyang X-Patchwork-Id: 26970 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id CEC83B6F35 for ; Thu, 7 May 2009 17:46:42 +1000 (EST) Received: by ozlabs.org (Postfix) id BF19BDDF9E; Thu, 7 May 2009 17:46:42 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 6091BDDF9D for ; Thu, 7 May 2009 17:46:42 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754601AbZEGHqf (ORCPT ); Thu, 7 May 2009 03:46:35 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754181AbZEGHqf (ORCPT ); Thu, 7 May 2009 03:46:35 -0400 Received: from cn.fujitsu.com ([222.73.24.84]:55952 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1753897AbZEGHqe (ORCPT ); Thu, 7 May 2009 03:46:34 -0400 Received: from tang.cn.fujitsu.com (tang.cn.fujitsu.com [10.167.250.3]) by song.cn.fujitsu.com (Postfix) with ESMTP id 0019617008D; Thu, 7 May 2009 16:53:29 +0800 (CST) Received: from fnst.cn.fujitsu.com (localhost.localdomain [127.0.0.1]) by tang.cn.fujitsu.com (8.13.1/8.13.1) with ESMTP id n477knqO008435; Thu, 7 May 2009 15:46:49 +0800 Received: from localhost.localdomain (unknown [10.167.141.200]) by fnst.cn.fujitsu.com (Postfix) with ESMTPA id 92F2ED4016; Thu, 7 May 2009 15:55:10 +0800 (CST) Message-ID: <4A02921A.1090200@cn.fujitsu.com> Date: Thu, 07 May 2009 15:47:38 +0800 From: Yang Hongyang User-Agent: Thunderbird 2.0.0.17 (X11/20081009) MIME-Version: 1.0 To: David Miller CC: "netdev@vger.kernel.org" , yoshfuji@linux-ipv6.org Subject: [PATCH]ipv6:use ipv6_addr_type instead of __ipv6_addr_type Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Although the function of these two functions are the same,we should use the encapsulation function of __ipv6_addr_type Signed-off-by: Yang Hongyang --- net/ipv6/addrconf.c | 4 ++-- net/ipv6/datagram.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index a8218bc..01b7a83 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -1126,7 +1126,7 @@ int ipv6_dev_get_saddr(struct net *net, struct net_device *dst_dev, struct net_device *dev; int dst_type; - dst_type = __ipv6_addr_type(daddr); + dst_type = ipv6_addr_type(daddr); dst.addr = daddr; dst.ifindex = dst_dev ? dst_dev->ifindex : 0; dst.scope = __ipv6_addr_src_scope(dst_type); @@ -1181,7 +1181,7 @@ int ipv6_dev_get_saddr(struct net *net, struct net_device *dst_dev, (!(score->ifa->flags & IFA_F_OPTIMISTIC))) continue; - score->addr_type = __ipv6_addr_type(&score->ifa->addr); + score->addr_type = ipv6_addr_type(&score->ifa->addr); if (unlikely(score->addr_type == IPV6_ADDR_ANY || score->addr_type & IPV6_ADDR_MULTICAST)) { diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c index e2bdc6d..7ea5c77 100644 --- a/net/ipv6/datagram.c +++ b/net/ipv6/datagram.c @@ -537,7 +537,7 @@ int datagram_send_ctl(struct net *net, fl->oif = src_info->ipi6_ifindex; } - addr_type = __ipv6_addr_type(&src_info->ipi6_addr); + addr_type = ipv6_addr_type(&src_info->ipi6_addr); if (fl->oif) { dev = dev_get_by_index(net, fl->oif);