netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Sergey Ryazanov <ryazanov.s.a@gmail.com>,
	"David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
	netdev@vger.kernel.org, M Chetan Kumar <m.chetan.kumar@intel.com>,
	Intel Corporation <linuxwwan@intel.com>,
	Loic Poulain <loic.poulain@linaro.org>,
	Johannes Berg <johannes@sipsolutions.net>
Subject: Re: [PATCH RESEND net-next 5/5] net: wwan: core: make debugfs optional
Date: Mon, 29 Nov 2021 01:04:57 +0800	[thread overview]
Message-ID: <202111290026.HEuigppG-lkp@intel.com> (raw)
In-Reply-To: <20211128125522.23357-6-ryazanov.s.a@gmail.com>

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@intel.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

  parent reply	other threads:[~2021-11-28 17:07 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-28 12:55 [PATCH RESEND net-next 0/5] WWAN debugfs tweaks Sergey Ryazanov
2021-11-28 12:55 ` [PATCH RESEND net-next 1/5] net: wwan: iosm: consolidate trace port init code Sergey Ryazanov
2021-11-28 12:55 ` [PATCH RESEND net-next 2/5] net: wwan: iosm: allow trace port be uninitialized Sergey Ryazanov
2021-11-28 12:55 ` [PATCH RESEND net-next 3/5] net: wwan: iosm: move debugfs knobs into a subdir Sergey Ryazanov
2021-11-28 12:55 ` [PATCH RESEND net-next 4/5] net: wwan: iosm: make debugfs optional Sergey Ryazanov
2021-11-28 12:55 ` [PATCH RESEND net-next 5/5] net: wwan: core: " Sergey Ryazanov
2021-11-28 17:01   ` Johannes Berg
2021-11-28 23:45     ` Sergey Ryazanov
2021-11-29  6:40       ` Leon Romanovsky
2021-11-29 23:44         ` Sergey Ryazanov
2021-11-30 10:05           ` Leon Romanovsky
2021-12-01 22:03             ` Sergey Ryazanov
2021-12-02 12:03               ` Leon Romanovsky
2021-12-02 22:42                 ` Sergey Ryazanov
2021-11-28 17:04   ` kernel test robot [this message]
2021-11-28 17:05   ` Johannes Berg
2021-11-28 22:57     ` Sergey Ryazanov
2021-11-28 18:27 ` [PATCH RESEND net-next 0/5] WWAN debugfs tweaks Leon Romanovsky
2021-11-30  8:03   ` Johannes Berg

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=202111290026.HEuigppG-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=davem@davemloft.net \
    --cc=johannes@sipsolutions.net \
    --cc=kbuild-all@lists.01.org \
    --cc=kuba@kernel.org \
    --cc=linuxwwan@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=loic.poulain@linaro.org \
    --cc=m.chetan.kumar@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=ryazanov.s.a@gmail.com \
    /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 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).