Skip to contentSkip to conversation

ax25: af_ax25: Remove unnecessary (void*) conversions

PATCH Applied Li zeming 2 participants 2 messages Nov 15, 2022 – Nov 16, 2022

Subsystems (2)
lore
Share & tools
lore

Li zeming

author
#0 lore raw

PATCH 1/1 ax25: af_ax25: Remove unnecessary (void*) conversions

The valptr pointer is of (void *) type, so other pointers need not be forced to assign values to it.

---
 net/ax25/af_ax25.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
net/ax25/af_ax25.c +2 -2
index 6b4c25a92377..d8da400cb4de 100644
@@ -723,7 +723,7 @@ static int ax25_getsockopt(struct socket *sock, int level, int optname,
 	if (maxlen < 1)
 		return -EFAULT;
 
-	valptr = (void *) &val;
+	valptr = &val;
 	length = min_t(unsigned int, maxlen, sizeof(int));
 
 	lock_sock(sk);
@@ -785,7 +785,7 @@ static int ax25_getsockopt(struct socket *sock, int level, int optname,
 			length = 1;
 		}
 
-		valptr = (void *) devname;
+		valptr = devname;
 		break;
 
 	default:
Signature · 1 line
2.18.2
#1 lore raw
This patch was applied to netdev/net-next.git (master) by David S. Miller <[email protected]>:

Hello:

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

Quoted 7 lines · On Tue, 15 Nov 2022 10:14:24 +0800 you wrote:

The valptr pointer is of (void *) type, so other pointers need not be forced to assign values to it.

---
 net/ax25/af_ax25.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Here is the summary with links:
- ax25: af_ax25: Remove unnecessary (void*) conversions

    https://git.kernel.org/netdev/net-next/c/1d7322f28fde

You are awesome, thank you!

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