[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202111290026.HEuigppG-lkp@intel.com>
Date: Mon, 29 Nov 2021 01:04:57 +0800
From: kernel test robot <lkp@...el.com>
To: Sergey Ryazanov <ryazanov.s.a@...il.com>,
"David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
netdev@...r.kernel.org, M Chetan Kumar <m.chetan.kumar@...el.com>,
Intel Corporation <linuxwwan@...el.com>,
Loic Poulain <loic.poulain@...aro.org>,
Johannes Berg <johannes@...solutions.net>
Subject: Re: [PATCH RESEND net-next 5/5] net: wwan: core: make debugfs
optional
Hi Sergey,
I love your patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Sergey-Ryazanov/WWAN-debugfs-tweaks/20211128-210031
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git d40ce48cb3a68b54be123a1f99157c5ac613e260
config: i386-randconfig-a001-20211128 (https://download.01.org/0day-ci/archive/20211129/202111290026.HEuigppG-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 5c64d8ef8cc0c0ed3e0f2ae693d99e7f70f20a84)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/89654e5e973a53b8375f37395c03359c59b63a99
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Sergey-Ryazanov/WWAN-debugfs-tweaks/20211128-210031
git checkout 89654e5e973a53b8375f37395c03359c59b63a99
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/net/wwan/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
>> drivers/net/wwan/wwan_core.c:171:14: warning: variable 'wwandev_name' set but not used [-Wunused-but-set-variable]
const char *wwandev_name;
^
1 warning generated.
vim +/wwandev_name +171 drivers/net/wwan/wwan_core.c
c4804670026b93f M Chetan Kumar 2021-11-20 162
9a44c1cc6388762 Loic Poulain 2021-04-16 163 /* This function allocates and registers a new WWAN device OR if a WWAN device
9a44c1cc6388762 Loic Poulain 2021-04-16 164 * already exist for the given parent, it gets a reference and return it.
9a44c1cc6388762 Loic Poulain 2021-04-16 165 * This function is not exported (for now), it is called indirectly via
9a44c1cc6388762 Loic Poulain 2021-04-16 166 * wwan_create_port().
9a44c1cc6388762 Loic Poulain 2021-04-16 167 */
9a44c1cc6388762 Loic Poulain 2021-04-16 168 static struct wwan_device *wwan_create_dev(struct device *parent)
9a44c1cc6388762 Loic Poulain 2021-04-16 169 {
9a44c1cc6388762 Loic Poulain 2021-04-16 170 struct wwan_device *wwandev;
c4804670026b93f M Chetan Kumar 2021-11-20 @171 const char *wwandev_name;
9a44c1cc6388762 Loic Poulain 2021-04-16 172 int err, id;
9a44c1cc6388762 Loic Poulain 2021-04-16 173
9a44c1cc6388762 Loic Poulain 2021-04-16 174 /* The 'find-alloc-register' operation must be protected against
9a44c1cc6388762 Loic Poulain 2021-04-16 175 * concurrent execution, a WWAN device is possibly shared between
9a44c1cc6388762 Loic Poulain 2021-04-16 176 * multiple callers or concurrently unregistered from wwan_remove_dev().
9a44c1cc6388762 Loic Poulain 2021-04-16 177 */
9a44c1cc6388762 Loic Poulain 2021-04-16 178 mutex_lock(&wwan_register_lock);
9a44c1cc6388762 Loic Poulain 2021-04-16 179
9a44c1cc6388762 Loic Poulain 2021-04-16 180 /* If wwandev already exists, return it */
9a44c1cc6388762 Loic Poulain 2021-04-16 181 wwandev = wwan_dev_get_by_parent(parent);
9a44c1cc6388762 Loic Poulain 2021-04-16 182 if (!IS_ERR(wwandev))
9a44c1cc6388762 Loic Poulain 2021-04-16 183 goto done_unlock;
9a44c1cc6388762 Loic Poulain 2021-04-16 184
9a44c1cc6388762 Loic Poulain 2021-04-16 185 id = ida_alloc(&wwan_dev_ids, GFP_KERNEL);
d9d5b8961284b00 Andy Shevchenko 2021-08-11 186 if (id < 0) {
d9d5b8961284b00 Andy Shevchenko 2021-08-11 187 wwandev = ERR_PTR(id);
9a44c1cc6388762 Loic Poulain 2021-04-16 188 goto done_unlock;
d9d5b8961284b00 Andy Shevchenko 2021-08-11 189 }
9a44c1cc6388762 Loic Poulain 2021-04-16 190
9a44c1cc6388762 Loic Poulain 2021-04-16 191 wwandev = kzalloc(sizeof(*wwandev), GFP_KERNEL);
9a44c1cc6388762 Loic Poulain 2021-04-16 192 if (!wwandev) {
d9d5b8961284b00 Andy Shevchenko 2021-08-11 193 wwandev = ERR_PTR(-ENOMEM);
9a44c1cc6388762 Loic Poulain 2021-04-16 194 ida_free(&wwan_dev_ids, id);
9a44c1cc6388762 Loic Poulain 2021-04-16 195 goto done_unlock;
9a44c1cc6388762 Loic Poulain 2021-04-16 196 }
9a44c1cc6388762 Loic Poulain 2021-04-16 197
9a44c1cc6388762 Loic Poulain 2021-04-16 198 wwandev->dev.parent = parent;
9a44c1cc6388762 Loic Poulain 2021-04-16 199 wwandev->dev.class = wwan_class;
9a44c1cc6388762 Loic Poulain 2021-04-16 200 wwandev->dev.type = &wwan_dev_type;
9a44c1cc6388762 Loic Poulain 2021-04-16 201 wwandev->id = id;
9a44c1cc6388762 Loic Poulain 2021-04-16 202 dev_set_name(&wwandev->dev, "wwan%d", wwandev->id);
9a44c1cc6388762 Loic Poulain 2021-04-16 203
9a44c1cc6388762 Loic Poulain 2021-04-16 204 err = device_register(&wwandev->dev);
9a44c1cc6388762 Loic Poulain 2021-04-16 205 if (err) {
9a44c1cc6388762 Loic Poulain 2021-04-16 206 put_device(&wwandev->dev);
d9d5b8961284b00 Andy Shevchenko 2021-08-11 207 wwandev = ERR_PTR(err);
d9d5b8961284b00 Andy Shevchenko 2021-08-11 208 goto done_unlock;
9a44c1cc6388762 Loic Poulain 2021-04-16 209 }
9a44c1cc6388762 Loic Poulain 2021-04-16 210
c4804670026b93f M Chetan Kumar 2021-11-20 211 wwandev_name = kobject_name(&wwandev->dev.kobj);
89654e5e973a53b Sergey Ryazanov 2021-11-28 212 #ifdef CONFIG_WWAN_DEBUGFS
c4804670026b93f M Chetan Kumar 2021-11-20 213 wwandev->debugfs_dir = debugfs_create_dir(wwandev_name,
c4804670026b93f M Chetan Kumar 2021-11-20 214 wwan_debugfs_dir);
89654e5e973a53b Sergey Ryazanov 2021-11-28 215 #endif
c4804670026b93f M Chetan Kumar 2021-11-20 216
9a44c1cc6388762 Loic Poulain 2021-04-16 217 done_unlock:
9a44c1cc6388762 Loic Poulain 2021-04-16 218 mutex_unlock(&wwan_register_lock);
9a44c1cc6388762 Loic Poulain 2021-04-16 219
9a44c1cc6388762 Loic Poulain 2021-04-16 220 return wwandev;
9a44c1cc6388762 Loic Poulain 2021-04-16 221 }
9a44c1cc6388762 Loic Poulain 2021-04-16 222
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Powered by blists - more mailing lists