linux_dsm_epyc7002/drivers/infiniband/hw/usnic
Denys Vlasenko 9b2c45d479 net: make getname() functions return length rather than use int* parameter
Changes since v1:
Added changes in these files:
    drivers/infiniband/hw/usnic/usnic_transport.c
    drivers/staging/lustre/lnet/lnet/lib-socket.c
    drivers/target/iscsi/iscsi_target_login.c
    drivers/vhost/net.c
    fs/dlm/lowcomms.c
    fs/ocfs2/cluster/tcp.c
    security/tomoyo/network.c

Before:
All these functions either return a negative error indicator,
or store length of sockaddr into "int *socklen" parameter
and return zero on success.

"int *socklen" parameter is awkward. For example, if caller does not
care, it still needs to provide on-stack storage for the value
it does not need.

None of the many FOO_getname() functions of various protocols
ever used old value of *socklen. They always just overwrite it.

This change drops this parameter, and makes all these functions, on success,
return length of sockaddr. It's always >= 0 and can be differentiated
from an error.

Tests in callers are changed from "if (err)" to "if (err < 0)", where needed.

rpc_sockname() lost "int buflen" parameter, since its only use was
to be passed to kernel_getsockname() as &buflen and subsequently
not used in any way.

Userspace API is not changed.

    text    data     bss      dec     hex filename
30108430 2633624  873672 33615726 200ef6e vmlinux.before.o
30108109 2633612  873672 33615393 200ee21 vmlinux.o

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
CC: David S. Miller <davem@davemloft.net>
CC: linux-kernel@vger.kernel.org
CC: netdev@vger.kernel.org
CC: linux-bluetooth@vger.kernel.org
CC: linux-decnet-user@lists.sourceforge.net
CC: linux-wireless@vger.kernel.org
CC: linux-rdma@vger.kernel.org
CC: linux-sctp@vger.kernel.org
CC: linux-nfs@vger.kernel.org
CC: linux-x25@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-02-12 14:15:04 -05:00
..
Kconfig IB/usnic: Add dependency on CONFIG_INET 2014-01-18 13:48:54 -08:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
usnic_abi.h usnic: add missing clauses to BSD license 2015-10-06 13:43:25 -04:00
usnic_common_pkt_hdr.h RDMA: Adding ethertype ETH_P_IBOE 2017-01-10 14:05:11 -05:00
usnic_common_util.h {net,IB}/{rxe,usnic}: Utilize generic mac to eui32 function 2017-04-25 14:21:34 -04:00
usnic_debugfs.c IB/usnic: Improve a failure message 2015-12-23 10:50:57 -05:00
usnic_debugfs.h usnic: add missing clauses to BSD license 2015-10-06 13:43:25 -04:00
usnic_fwd.c RDMA/usnic: Fix remove address space warning 2017-08-24 16:27:10 -04:00
usnic_fwd.h RDMA/usnic: Fix remove address space warning 2017-08-24 16:27:10 -04:00
usnic_ib_main.c RDMA/usnic: Fix remove address space warning 2017-08-24 16:27:10 -04:00
usnic_ib_qp_grp.c RDMA/usnic: Remove a set-but-not-used variable 2017-10-14 20:47:07 -04:00
usnic_ib_qp_grp.h RDMA/usnic: Instantiate data structures once 2017-10-14 20:47:07 -04:00
usnic_ib_sysfs.c drivers: infiniband: remove duplicate includes 2017-12-22 09:39:35 -07:00
usnic_ib_sysfs.h usnic: add missing clauses to BSD license 2015-10-06 13:43:25 -04:00
usnic_ib_verbs.c drivers: infiniband: remove duplicate includes 2017-12-22 09:39:35 -07:00
usnic_ib_verbs.h IB/usnic: Implement get_netdev hook 2017-07-24 08:44:46 -04:00
usnic_ib.h usnic: add missing clauses to BSD license 2015-10-06 13:43:25 -04:00
usnic_log.h usnic: add missing clauses to BSD license 2015-10-06 13:43:25 -04:00
usnic_transport.c net: make getname() functions return length rather than use int* parameter 2018-02-12 14:15:04 -05:00
usnic_transport.h usnic: add missing clauses to BSD license 2015-10-06 13:43:25 -04:00
usnic_uiom_interval_tree.c lib/interval_tree: fast overlap detection 2017-09-08 18:26:49 -07:00
usnic_uiom_interval_tree.h lib/interval_tree: fast overlap detection 2017-09-08 18:26:49 -07:00
usnic_uiom.c lib/interval_tree: fast overlap detection 2017-09-08 18:26:49 -07:00
usnic_uiom.h lib/interval_tree: fast overlap detection 2017-09-08 18:26:49 -07:00
usnic_vnic.c IB/usninc: Remove and fix debug prints after allocation failure 2016-12-03 13:12:52 -05:00
usnic_vnic.h usnic: add missing clauses to BSD license 2015-10-06 13:43:25 -04:00
usnic.h usnic: add missing clauses to BSD license 2015-10-06 13:43:25 -04:00