net: remove noblock parameter from skb_recv_datagram()
authorOliver Hartkopp <socketcan@hartkopp.net>
Mon, 4 Apr 2022 16:30:22 +0000 (18:30 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Apr 2022 12:45:26 +0000 (13:45 +0100)
commitf4b41f062c424209e3939a81e6da022e049a45f2
treecd8e8a16fb7cc256ad2a0f4136b169bce3d40e47
parent0b5c21bbc01e92745ca1ca4f6fd87d878fa3ea5e
net: remove noblock parameter from skb_recv_datagram()

skb_recv_datagram() has two parameters 'flags' and 'noblock' that are
merged inside skb_recv_datagram() by 'flags | (noblock ? MSG_DONTWAIT : 0)'

As 'flags' may contain MSG_DONTWAIT as value most callers split the 'flags'
into 'flags' and 'noblock' with finally obsolete bit operations like this:

skb_recv_datagram(sk, flags & ~MSG_DONTWAIT, flags & MSG_DONTWAIT, &rc);

And this is not even done consistently with the 'flags' parameter.

This patch removes the obsolete and costly splitting into two parameters
and only performs bit operations when really needed on the caller side.

One missing conversion thankfully reported by kernel test robot. I missed
to enable kunit tests to build the mctp code.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
37 files changed:
drivers/isdn/mISDN/socket.c
drivers/net/ppp/pppoe.c
include/linux/skbuff.h
net/appletalk/ddp.c
net/atm/common.c
net/ax25/af_ax25.c
net/bluetooth/af_bluetooth.c
net/bluetooth/hci_sock.c
net/caif/caif_socket.c
net/can/bcm.c
net/can/isotp.c
net/can/j1939/socket.c
net/can/raw.c
net/core/datagram.c
net/ieee802154/socket.c
net/ipv4/ping.c
net/ipv4/raw.c
net/ipv6/raw.c
net/iucv/af_iucv.c
net/key/af_key.c
net/l2tp/l2tp_ip.c
net/l2tp/l2tp_ip6.c
net/l2tp/l2tp_ppp.c
net/mctp/af_mctp.c
net/mctp/test/route-test.c
net/netlink/af_netlink.c
net/netrom/af_netrom.c
net/nfc/llcp_sock.c
net/nfc/rawsock.c
net/packet/af_packet.c
net/phonet/datagram.c
net/phonet/pep.c
net/qrtr/af_qrtr.c
net/rose/af_rose.c
net/unix/af_unix.c
net/vmw_vsock/vmci_transport.c
net/x25/af_x25.c