From: kernel test robot <lkp@intel.com>
To: David Wei <dw@davidwei.uk>, Jakub Kicinski <kuba@kernel.org>,
Jiri Pirko <jiri@resnulli.us>,
Sabrina Dubroca <sd@queasysnail.net>,
netdev@vger.kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH net-next v4 2/5] netdevsim: allow two netdevsim ports to be connected
Date: Wed, 20 Dec 2023 20:58:42 +0800 [thread overview]
Message-ID: <202312202036.QxZ1fdee-lkp@intel.com> (raw)
In-Reply-To: <20231220014747.1508581-3-dw@davidwei.uk>
Hi David,
kernel test robot noticed the following build warnings:
[auto build test WARNING on net-next/main]
url: https://github.com/intel-lab-lkp/linux/commits/David-Wei/netdevsim-maintain-a-list-of-probed-netdevsims/20231220-095238
base: net-next/main
patch link: https://lore.kernel.org/r/20231220014747.1508581-3-dw%40davidwei.uk
patch subject: [PATCH net-next v4 2/5] netdevsim: allow two netdevsim ports to be connected
config: arm64-allyesconfig (https://download.01.org/0day-ci/archive/20231220/202312202036.QxZ1fdee-lkp@intel.com/config)
compiler: clang version 18.0.0git (https://github.com/llvm/llvm-project 10056c821a56a19cef732129e4e0c5883ae1ee49)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231220/202312202036.QxZ1fdee-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312202036.QxZ1fdee-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/net/netdevsim/dev.c:431:6: warning: variable 'ret' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
431 | if (!peer)
| ^~~~~
drivers/net/netdevsim/dev.c:443:9: note: uninitialized use occurs here
443 | return ret;
| ^~~
drivers/net/netdevsim/dev.c:431:2: note: remove the 'if' if its condition is always false
431 | if (!peer)
| ^~~~~~~~~~
432 | goto out;
| ~~~~~~~~
drivers/net/netdevsim/dev.c:425:13: note: initialize the variable 'ret' to silence this warning
425 | ssize_t ret;
| ^
| = 0
1 warning generated.
vim +431 drivers/net/netdevsim/dev.c
417
418 static ssize_t nsim_dev_peer_read(struct file *file, char __user *data,
419 size_t count, loff_t *ppos)
420 {
421 struct nsim_dev_port *nsim_dev_port;
422 struct netdevsim *peer;
423 unsigned int id, port;
424 char buf[23];
425 ssize_t ret;
426
427 mutex_lock(&nsim_dev_list_lock);
428 rtnl_lock();
429 nsim_dev_port = file->private_data;
430 peer = rtnl_dereference(nsim_dev_port->ns->peer);
> 431 if (!peer)
432 goto out;
433
434 id = peer->nsim_bus_dev->dev.id;
435 port = peer->nsim_dev_port->port_index;
436 ret = scnprintf(buf, sizeof(buf), "%u %u\n", id, port);
437 ret = simple_read_from_buffer(data, count, ppos, buf, ret);
438
439 out:
440 rtnl_unlock();
441 mutex_unlock(&nsim_dev_list_lock);
442
443 return ret;
444 }
445
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2023-12-20 13:00 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-20 1:47 [PATCH net-next v4 0/5] netdevsim: link and forward skbs between ports David Wei
2023-12-20 1:47 ` [PATCH net-next v4 1/5] netdevsim: maintain a list of probed netdevsims David Wei
2023-12-20 8:57 ` Jiri Pirko
2023-12-22 0:45 ` David Wei
2023-12-22 4:54 ` David Wei
2024-01-02 10:55 ` Jiri Pirko
2024-01-02 11:01 ` Jiri Pirko
2023-12-20 16:40 ` Simon Horman
2023-12-22 0:49 ` David Wei
2023-12-20 1:47 ` [PATCH net-next v4 2/5] netdevsim: allow two netdevsim ports to be connected David Wei
2023-12-20 9:09 ` Jiri Pirko
2023-12-22 0:47 ` David Wei
2024-01-02 10:56 ` Jiri Pirko
2023-12-20 12:58 ` kernel test robot [this message]
2023-12-20 1:47 ` [PATCH net-next v4 3/5] netdevsim: forward skbs from one connected port to another David Wei
2023-12-20 9:04 ` Jiri Pirko
2023-12-22 0:58 ` David Wei
2023-12-20 1:47 ` [PATCH net-next v4 4/5] netdevsim: add selftest for forwarding skb between connected ports David Wei
2023-12-20 1:47 ` [PATCH net-next v4 5/5] netdevsim: add Makefile for selftests David Wei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202312202036.QxZ1fdee-lkp@intel.com \
--to=lkp@intel.com \
--cc=dw@davidwei.uk \
--cc=edumazet@google.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=llvm@lists.linux.dev \
--cc=netdev@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pabeni@redhat.com \
--cc=sd@queasysnail.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.