Content-Type: multipart/mixed; boundary="===============1239037244724557862==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH RESEND net-next 5/5] net: wwan: core: make debugfs optional Date: Mon, 29 Nov 2021 01:04:57 +0800 Message-ID: <202111290026.HEuigppG-lkp@intel.com> In-Reply-To: <20211128125522.23357-6-ryazanov.s.a@gmail.com> List-Id: --===============1239037244724557862== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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-debug= fs-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/arch= ive/20211129/202111290026.HEuigppG-lkp(a)intel.com/config) compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 5c64d8= ef8cc0c0ed3e0f2ae693d99e7f70f20a84) reproduce (this is a W=3D1 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/89654e5e973a53b8375f37395= c03359c59b63a99 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Sergey-Ryazanov/WWAN-debugfs-tweak= s/20211128-210031 git checkout 89654e5e973a53b8375f37395c03359c59b63a99 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dclang make.cross W=3D= 1 O=3Dbuild_dir ARCH=3Di386 SHELL=3D/bin/bash drivers/net/wwan/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> drivers/net/wwan/wwan_core.c:171:14: warning: variable 'wwandev_name' se= t 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 g= iven parent, it gets a reference and return it. 9a44c1cc6388762 Loic Poulain 2021-04-16 165 * This function is not ex= ported (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 *wwand= ev; 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-regist= er' 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 co= ncurrently 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 exi= sts, return it */ 9a44c1cc6388762 Loic Poulain 2021-04-16 181 wwandev =3D 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 =3D ida_alloc(&wwan_de= v_ids, GFP_KERNEL); d9d5b8961284b00 Andy Shevchenko 2021-08-11 186 if (id < 0) { d9d5b8961284b00 Andy Shevchenko 2021-08-11 187 wwandev =3D 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 =3D kzalloc(sizeo= f(*wwandev), GFP_KERNEL); 9a44c1cc6388762 Loic Poulain 2021-04-16 192 if (!wwandev) { d9d5b8961284b00 Andy Shevchenko 2021-08-11 193 wwandev =3D ERR_PTR(-ENO= MEM); 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 =3D p= arent; 9a44c1cc6388762 Loic Poulain 2021-04-16 199 wwandev->dev.class =3D ww= an_class; 9a44c1cc6388762 Loic Poulain 2021-04-16 200 wwandev->dev.type =3D &ww= an_dev_type; 9a44c1cc6388762 Loic Poulain 2021-04-16 201 wwandev->id =3D id; 9a44c1cc6388762 Loic Poulain 2021-04-16 202 dev_set_name(&wwandev->de= v, "wwan%d", wwandev->id); 9a44c1cc6388762 Loic Poulain 2021-04-16 203 = 9a44c1cc6388762 Loic Poulain 2021-04-16 204 err =3D 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 =3D 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 =3D 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 =3D = 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_regist= er_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(a)lists.01.org --===============1239037244724557862==--