linux_dsm_epyc7002/net/decnet
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
..
netfilter netfilter: nf_hook_ops structs can be const 2017-07-31 19:10:44 +02:00
af_decnet.c net: make getname() functions return length rather than use int* parameter 2018-02-12 14:15:04 -05:00
dn_dev.c net: delete /proc THIS_MODULE references 2018-01-16 15:01:33 -05:00
dn_fib.c net: use rtnl_register_module where needed 2017-12-04 11:32:39 -05:00
dn_neigh.c net: delete /proc THIS_MODULE references 2018-01-16 15:01:33 -05:00
dn_nsp_in.c net: decnet: dn_nsp_in: use swap macro in dn_nsp_rx_packet 2017-11-01 12:05:49 +09:00
dn_nsp_out.c net: decnet: dn_nsp_out: use swap macro in dn_mk_ack_header 2017-11-01 12:05:49 +09:00
dn_route.c net: delete /proc THIS_MODULE references 2018-01-16 15:01:33 -05:00
dn_rules.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dn_table.c net: decnet: dn_table: mark expected switch fall-through 2017-11-11 19:10:06 +09:00
dn_timer.c treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
Kconfig net/decnet: remove depends on CONFIG_EXPERIMENTAL 2013-01-11 11:39:34 -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
README Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sysctl_net_decnet.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
TODO Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00

                       Linux DECnet Project
                      ======================

The documentation for this kernel subsystem is available in the
Documentation/networking subdirectory of this distribution and also
on line at http://www.chygwyn.com/DECnet/

Steve Whitehouse <SteveW@ACM.org>