Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH][next] mctp: remove duplicated assignment of pointer hdr
@ 2021-08-04 12:15 Colin King
2021-08-05 10:00 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2021-08-04 12:15 UTC (permalink / raw)
To: Jeremy Kerr, Matt Johnston, David S . Miller, Jakub Kicinski, netdev
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The pointer hdr is being initialized and also re-assigned with the
same value from the call to function mctp_hdr. Static analysis reports
that the initializated value is unused. The second assignment is
duplicated and can be removed.
Addresses-Coverity: ("Unused value").
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
net/mctp/af_mctp.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/mctp/af_mctp.c b/net/mctp/af_mctp.c
index 84f722d31fd7..a9526ac29dff 100644
--- a/net/mctp/af_mctp.c
+++ b/net/mctp/af_mctp.c
@@ -170,7 +170,6 @@ static int mctp_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
/* TODO: expand mctp_skb_cb for header fields? */
struct mctp_hdr *hdr = mctp_hdr(skb);
- hdr = mctp_hdr(skb);
addr = msg->msg_name;
addr->smctp_family = AF_MCTP;
addr->smctp_network = cb->net;
--
2.31.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH][next] mctp: remove duplicated assignment of pointer hdr
2021-08-04 12:15 [PATCH][next] mctp: remove duplicated assignment of pointer hdr Colin King
@ 2021-08-05 10:00 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-08-05 10:00 UTC (permalink / raw)
To: Colin King; +Cc: jk, matt, davem, kuba, netdev, kernel-janitors, linux-kernel
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
On Wed, 4 Aug 2021 13:15:30 +0100 you wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The pointer hdr is being initialized and also re-assigned with the
> same value from the call to function mctp_hdr. Static analysis reports
> that the initializated value is unused. The second assignment is
> duplicated and can be removed.
>
> [...]
Here is the summary with links:
- [next] mctp: remove duplicated assignment of pointer hdr
https://git.kernel.org/netdev/net-next/c/df7ba0eb25ed
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-05 10:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-04 12:15 [PATCH][next] mctp: remove duplicated assignment of pointer hdr Colin King
2021-08-05 10:00 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).