From patchwork Tue Oct 22 04:11:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ZHAO Gang X-Patchwork-Id: 285345 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 71FEC2C00C4 for ; Tue, 22 Oct 2013 15:12:18 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751174Ab3JVEL6 (ORCPT ); Tue, 22 Oct 2013 00:11:58 -0400 Received: from mail-pa0-f48.google.com ([209.85.220.48]:53032 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750753Ab3JVEL5 (ORCPT ); Tue, 22 Oct 2013 00:11:57 -0400 Received: by mail-pa0-f48.google.com with SMTP id bj1so9077189pad.21 for ; Mon, 21 Oct 2013 21:11:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=Drga8ub6Yw1EJeZoskl03oRkQH19l56VpnPJgTVtUc0=; b=eu6+JKpOdw8mffnTpDLP+ke6IvxPjOgEYcoxRO70U2v8Z966bSPof3Uf6w2mYrViKh zOzkPSVnX/2mhkcsQOPPu4cjHIVRnE4UinklBK+jDQZnifqQem4lPP0SHLmg7vGV4Dbb /MTWzoyoo3d8BPNQ87QDc3zCgVIkfYpteE4fBycEKm6Yhc4GYu9gYUdwHLEMQH9XokBQ +G24xtFHhf8J5eN88B5ebUftaUgrMRZaKFwq0uJ9mnmYom1uBKGzqLe84Jcs4zrpbKBi Tyz/Qv8hW2p9Df6uIQ6m698zKHK6St0rLhhL1fMaqyvmxhLYdonaTxZrgQcFxIndv8cy w98w== X-Received: by 10.66.66.76 with SMTP id d12mr5257362pat.162.1382415116626; Mon, 21 Oct 2013 21:11:56 -0700 (PDT) Received: from will ([106.120.177.140]) by mx.google.com with ESMTPSA id xv2sm24373829pbb.39.2013.10.21.21.11.52 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 21 Oct 2013 21:11:56 -0700 (PDT) Date: Tue, 22 Oct 2013 12:11:24 +0800 From: ZHAO Gang To: "David S. Miller" Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next] net: remove function sk_reset_txq() Message-ID: <20131022041124.GA14122@will> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org What sk_reset_txq() does is just calls function sk_tx_queue_reset(), and sk_reset_txq() is used only in sock.h, by dst_negative_advice(). Let dst_negative_advice() calls sk_tx_queue_reset() directly so we can remove unneeded sk_reset_txq(). Signed-off-by: ZHAO Gang --- include/net/sock.h | 4 +--- net/core/sock.c | 6 ------ 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/include/net/sock.h b/include/net/sock.h index 1d37a80..db66682 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -1752,8 +1752,6 @@ sk_dst_get(struct sock *sk) return dst; } -extern void sk_reset_txq(struct sock *sk); - static inline void dst_negative_advice(struct sock *sk) { struct dst_entry *ndst, *dst = __sk_dst_get(sk); @@ -1763,7 +1761,7 @@ static inline void dst_negative_advice(struct sock *sk) if (ndst != dst) { rcu_assign_pointer(sk->sk_dst_cache, ndst); - sk_reset_txq(sk); + sk_tx_queue_clear(sk); } } } diff --git a/net/core/sock.c b/net/core/sock.c index 5b6beba..3f1545f 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -475,12 +475,6 @@ discard_and_relse: } EXPORT_SYMBOL(sk_receive_skb); -void sk_reset_txq(struct sock *sk) -{ - sk_tx_queue_clear(sk); -} -EXPORT_SYMBOL(sk_reset_txq); - struct dst_entry *__sk_dst_check(struct sock *sk, u32 cookie) { struct dst_entry *dst = __sk_dst_get(sk);