Skip to contentSkip to conversation

net: fix documentation for kernel_getsockname

PATCH Applied Alex Maydanik 4 participants 4 messages Feb 12, 2022 – Feb 14, 2022

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: fix documentation for kernel_getsockname

Fixes return value documentation of kernel_getsockname() and kernel_getpeername() functions.

The previous documentation wrongly specified that the return value is 0 in case of success, however sock->ops->getname returns the length of the address in bytes in case of success.

---
 net/socket.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
net/socket.c +2 -2
index 50cf75730fd7..982eecad464c 100644
@@ -3448,7 +3448,7 @@ EXPORT_SYMBOL(kernel_connect);
  *	@addr: address holder
  *
  * 	Fills the @addr pointer with the address which the socket is bound.
- *	Returns 0 or an error code.
+ *	Returns the length of the address in bytes or an error code.
  */
 
 int kernel_getsockname(struct socket *sock, struct sockaddr *addr)
@@ -3463,7 +3463,7 @@ EXPORT_SYMBOL(kernel_getsockname);
  *	@addr: address holder
  *
  * 	Fills the @addr pointer with the address which the socket is connected.
- *	Returns 0 or an error code.
+ *	Returns the length of the address in bytes or an error code.
  */
 
 int kernel_getpeername(struct socket *sock, struct sockaddr *addr)
Signature · 1 line
2.25.1
#1 lore raw
This patch was applied to netdev/net.git (master) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net.git (master)
by David S. Miller <[email protected]>:

Quoted 8 lines · On Sat, 12 Feb 2022 12:29:27 +0200 you wrote:

Fixes return value documentation of kernel_getsockname() and kernel_getpeername() functions.

The previous documentation wrongly specified that the return value is 0 in case of success, however sock->ops->getname returns the length of the address in bytes in case of success.

[...]

Here is the summary with links:
- net: fix documentation for kernel_getsockname

    https://git.kernel.org/netdev/net/c/0fc95dec096c

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
#2 lore raw

Re: net: fix documentation for kernel_getsockname: Build Failure

In reply to Alex Maydanik

Hi Alex,

Thank you for your modifications, that's great!

But sadly, our CI spotted some issues with it when trying to build it.

You can find more details there:

https://patchwork.kernel.org/project/mptcp/patch/[email protected]/
https://github.com/multipath-tcp/mptcp_net-next/actions/runs/1843188936

Status: failure
Initiator: MPTCPimporter
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/ec18713d1f5d

Feel free to reply to this email if you cannot access logs, if you need some support to fix the error, if this doesn't seem to be caused by your modifications or if the error is a false positive one.

Cheers,
MPTCP GH Action bot

#3 lore raw

Re: net: fix documentation for kernel_getsockname: Build Failure

Quoted 6 lines · MPTCP CI

Hi Alex,

Thank you for your modifications, that's great!

But sadly, our CI spotted some issues with it when trying to build it.

Quoted 9 lines

You can find more details there:

https://patchwork.kernel.org/project/mptcp/patch/[email protected]/
https://github.com/multipath-tcp/mptcp_net-next/actions/runs/1843188936

Status: failure
Initiator: MPTCPimporter
Commits: https://github.com/multipath-tcp/mptcp_net-next/commits/ec18713d1f5d

Alex,

Sorry about the unexpected email from our CI system. It appears there was an issue with patchew.org that somehow applied and tagged your patch in our github repo even though you didn't send to our mailing list.

--
Mat Martineau
Intel