public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] devlink: remove a dubious assumption in fmsg dumping
@ 2023-01-24  3:52 Jakub Kicinski
  2023-01-24 12:18 ` Jiri Pirko
  2023-01-25  4:40 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Jakub Kicinski @ 2023-01-24  3:52 UTC (permalink / raw)
  To: davem; +Cc: netdev, edumazet, pabeni, jiri, Jakub Kicinski

Build bot detects that err may be returned uninitialized in
devlink_fmsg_prepare_skb(). This is not really true because
all fmsgs users should create at least one outer nest, and
therefore fmsg can't be completely empty.

That said the assumption is not trivial to confirm, so let's
follow the bots advice, anyway.

This code does not seem to have changed since its inception in
commit 1db64e8733f6 ("devlink: Add devlink formatted message (fmsg) API")

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
 net/devlink/leftover.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/devlink/leftover.c b/net/devlink/leftover.c
index 8eab95cae917..74621287f4e5 100644
--- a/net/devlink/leftover.c
+++ b/net/devlink/leftover.c
@@ -7116,8 +7116,8 @@ devlink_fmsg_prepare_skb(struct devlink_fmsg *fmsg, struct sk_buff *skb,
 {
 	struct devlink_fmsg_item *item;
 	struct nlattr *fmsg_nlattr;
+	int err = 0;
 	int i = 0;
-	int err;
 
 	fmsg_nlattr = nla_nest_start_noflag(skb, DEVLINK_ATTR_FMSG);
 	if (!fmsg_nlattr)
-- 
2.39.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] devlink: remove a dubious assumption in fmsg dumping
  2023-01-24  3:52 [PATCH net-next] devlink: remove a dubious assumption in fmsg dumping Jakub Kicinski
@ 2023-01-24 12:18 ` Jiri Pirko
  2023-01-25  4:40 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Jiri Pirko @ 2023-01-24 12:18 UTC (permalink / raw)
  To: Jakub Kicinski; +Cc: davem, netdev, edumazet, pabeni

Tue, Jan 24, 2023 at 04:52:31AM CET, kuba@kernel.org wrote:
>Build bot detects that err may be returned uninitialized in
>devlink_fmsg_prepare_skb(). This is not really true because
>all fmsgs users should create at least one outer nest, and
>therefore fmsg can't be completely empty.
>
>That said the assumption is not trivial to confirm, so let's
>follow the bots advice, anyway.
>
>This code does not seem to have changed since its inception in
>commit 1db64e8733f6 ("devlink: Add devlink formatted message (fmsg) API")
>
>Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Reviewed-by: Jiri Pirko <jiri@nvidia.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] devlink: remove a dubious assumption in fmsg dumping
  2023-01-24  3:52 [PATCH net-next] devlink: remove a dubious assumption in fmsg dumping Jakub Kicinski
  2023-01-24 12:18 ` Jiri Pirko
@ 2023-01-25  4:40 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-01-25  4:40 UTC (permalink / raw)
  To: Jakub Kicinski; +Cc: davem, netdev, edumazet, pabeni, jiri

Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Mon, 23 Jan 2023 19:52:31 -0800 you wrote:
> Build bot detects that err may be returned uninitialized in
> devlink_fmsg_prepare_skb(). This is not really true because
> all fmsgs users should create at least one outer nest, and
> therefore fmsg can't be completely empty.
> 
> That said the assumption is not trivial to confirm, so let's
> follow the bots advice, anyway.
> 
> [...]

Here is the summary with links:
  - [net-next] devlink: remove a dubious assumption in fmsg dumping
    https://git.kernel.org/netdev/net-next/c/4373a023e038

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] 3+ messages in thread

end of thread, other threads:[~2023-01-25  4:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-24  3:52 [PATCH net-next] devlink: remove a dubious assumption in fmsg dumping Jakub Kicinski
2023-01-24 12:18 ` Jiri Pirko
2023-01-25  4:40 ` 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