Commit f4b41f0
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 <[email protected]>
Signed-off-by: Oliver Hartkopp <[email protected]>
Signed-off-by: David S. Miller <[email protected]>1 parent 0b5c21b commit f4b41f0
File tree
37 files changed
+57
-70
lines changed- drivers
- isdn/mISDN
- net/ppp
- include/linux
- net
- appletalk
- atm
- ax25
- bluetooth
- caif
- can
- j1939
- core
- ieee802154
- ipv4
- ipv6
- iucv
- key
- l2tp
- mctp
- test
- netlink
- netrom
- nfc
- packet
- phonet
- qrtr
- rose
- unix
- vmw_vsock
- x25
37 files changed
+57
-70
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
| 124 | + | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1011 | 1011 | | |
1012 | 1012 | | |
1013 | 1013 | | |
1014 | | - | |
1015 | | - | |
| 1014 | + | |
1016 | 1015 | | |
1017 | 1016 | | |
1018 | 1017 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3836 | 3836 | | |
3837 | 3837 | | |
3838 | 3838 | | |
3839 | | - | |
3840 | | - | |
| 3839 | + | |
3841 | 3840 | | |
3842 | 3841 | | |
3843 | 3842 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1753 | 1753 | | |
1754 | 1754 | | |
1755 | 1755 | | |
1756 | | - | |
1757 | | - | |
| 1756 | + | |
1758 | 1757 | | |
1759 | 1758 | | |
1760 | 1759 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
540 | 540 | | |
541 | 541 | | |
542 | 542 | | |
543 | | - | |
| 543 | + | |
544 | 544 | | |
545 | 545 | | |
546 | 546 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1669 | 1669 | | |
1670 | 1670 | | |
1671 | 1671 | | |
1672 | | - | |
1673 | | - | |
| 1672 | + | |
1674 | 1673 | | |
1675 | 1674 | | |
1676 | 1675 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
254 | | - | |
255 | 254 | | |
256 | 255 | | |
257 | 256 | | |
| |||
263 | 262 | | |
264 | 263 | | |
265 | 264 | | |
266 | | - | |
| 265 | + | |
267 | 266 | | |
268 | 267 | | |
269 | 268 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1453 | 1453 | | |
1454 | 1454 | | |
1455 | 1455 | | |
1456 | | - | |
1457 | 1456 | | |
1458 | 1457 | | |
1459 | 1458 | | |
| |||
1470 | 1469 | | |
1471 | 1470 | | |
1472 | 1471 | | |
1473 | | - | |
| 1472 | + | |
1474 | 1473 | | |
1475 | 1474 | | |
1476 | 1475 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
282 | 282 | | |
283 | 283 | | |
284 | 284 | | |
285 | | - | |
| 285 | + | |
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1632 | 1632 | | |
1633 | 1633 | | |
1634 | 1634 | | |
1635 | | - | |
1636 | 1635 | | |
1637 | 1636 | | |
1638 | | - | |
1639 | | - | |
1640 | | - | |
| 1637 | + | |
1641 | 1638 | | |
1642 | 1639 | | |
1643 | 1640 | | |
| |||
0 commit comments