From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.100; helo=mga07.intel.com; envelope-from=jiaxin.wu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id C4FD0222CB303 for ; Thu, 21 Dec 2017 23:02:33 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Dec 2017 23:07:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,439,1508828400"; d="scan'208";a="3965864" Received: from jiaxinwu-mobl2.ccr.corp.intel.com ([10.239.196.141]) by fmsmga002.fm.intel.com with ESMTP; 21 Dec 2017 23:07:22 -0800 From: Jiaxin Wu To: edk2-devel@lists.01.org Cc: Fu Siyuan , Wang Fan , Ye Ting , Wu Jiaxin Date: Fri, 22 Dec 2017 15:07:18 +0800 Message-Id: <1513926438-4160-3-git-send-email-jiaxin.wu@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1513926438-4160-1-git-send-email-jiaxin.wu@intel.com> References: <1513926438-4160-1-git-send-email-jiaxin.wu@intel.com> Subject: [Patch 2/3] NetworkPkg/TcpDxe: Remove the redundant code. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Dec 2017 07:02:34 -0000 The function SockGroup() is not used by any other code. So, it can be deleted. Cc: Fu Siyuan Cc: Wang Fan Cc: Ye Ting Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Wu Jiaxin --- NetworkPkg/TcpDxe/SockInterface.c | 46 --------------------------------------- NetworkPkg/TcpDxe/Socket.h | 21 +----------------- 2 files changed, 1 insertion(+), 66 deletions(-) diff --git a/NetworkPkg/TcpDxe/SockInterface.c b/NetworkPkg/TcpDxe/SockInterface.c index 0248cdf..0dfc0a7 100644 --- a/NetworkPkg/TcpDxe/SockInterface.c +++ b/NetworkPkg/TcpDxe/SockInterface.c @@ -1078,56 +1078,10 @@ SockGetMode ( { return Sock->ProtoHandler (Sock, SOCK_MODE, Mode); } /** - Configure the low level protocol to join a multicast group for - this socket's connection. - - @param[in] Sock Pointer to the socket of the connection to join the - specific multicast group. - @param[in] GroupInfo Pointer to the multicast group info. - - @retval EFI_SUCCESS The configuration completed successfully. - @retval EFI_ACCESS_DENIED Failed to get the lock to access the socket. - @retval EFI_NOT_STARTED The socket is not configured. - -**/ -EFI_STATUS -SockGroup ( - IN SOCKET *Sock, - IN VOID *GroupInfo - ) -{ - EFI_STATUS Status; - - Status = EfiAcquireLockOrFail (&(Sock->Lock)); - - if (EFI_ERROR (Status)) { - - DEBUG ( - (EFI_D_ERROR, - "SockGroup: Get the access for socket failed with %r", - Status) - ); - - return EFI_ACCESS_DENIED; - } - - if (SOCK_IS_UNCONFIGURED (Sock)) { - Status = EFI_NOT_STARTED; - goto Exit; - } - - Status = Sock->ProtoHandler (Sock, SOCK_GROUP, GroupInfo); - -Exit: - EfiReleaseLock (&(Sock->Lock)); - return Status; -} - -/** Add or remove route information in IP route table associated with this socket. @param[in] Sock Pointer to the socket associated with the IP route table to operate on. diff --git a/NetworkPkg/TcpDxe/Socket.h b/NetworkPkg/TcpDxe/Socket.h index f7f4a7a..26c5f4e 100644 --- a/NetworkPkg/TcpDxe/Socket.h +++ b/NetworkPkg/TcpDxe/Socket.h @@ -1,9 +1,9 @@ /** @file Common head file for TCP socket. - Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php. @@ -898,29 +898,10 @@ SockGetMode ( IN SOCKET *Sock, IN OUT VOID *Mode ); /** - Configure the low level protocol to join a multicast group for - this socket's connection. - - @param[in] Sock Pointer to the socket of the connection to join the - specific multicast group. - @param[in] GroupInfo Pointer to the multicast group information. - - @retval EFI_SUCCESS The configuration completed successfully. - @retval EFI_ACCESS_DENIED Failed to get the lock to access the socket. - @retval EFI_NOT_STARTED The socket is not configured. - -**/ -EFI_STATUS -SockGroup ( - IN SOCKET *Sock, - IN VOID *GroupInfo - ); - -/** Add or remove route information in IP route table associated with this socket. @param[in] Sock Pointer to the socket associated with the IP route table to operate on. -- 1.9.5.msysgit.1