All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: Re: [PATCH v5 1/2] char: xillybus: Move class-related functions to new xillybus_class.c
Date: Wed, 26 May 2021 21:22:07 +0800	[thread overview]
Message-ID: <202105262151.pX7ua7pO-lkp@intel.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 4899 bytes --]

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20210526100311.56327-2-eli.billauer@gmail.com>
References: <20210526100311.56327-2-eli.billauer@gmail.com>
TO: eli.billauer(a)gmail.com
TO: gregkh(a)linuxfoundation.org
TO: arnd(a)arndb.de
CC: linux-kernel(a)vger.kernel.org
CC: linux-usb(a)vger.kernel.org
CC: Eli Billauer <eli.billauer@gmail.com>

Hi,

I love your patch! Perhaps something to improve:

[auto build test WARNING on char-misc/char-misc-testing]
[also build test WARNING on soc/for-next linux/master linus/master v5.13-rc3 next-20210526]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/eli-billauer-gmail-com/Submission-of-XillyUSB-driver/20210526-180607
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git 83aacfbcbd42eec3882423bbafcb8b3190376ed8
:::::: branch date: 3 hours ago
:::::: commit date: 3 hours ago
config: i386-randconfig-c001-20210526 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Julia Lawall <julia.lawall@lip6.fr>


cocci warnings: (new ones prefixed by >>)
>> drivers/char/xillybus/xillybus_class.c:195:14-18: ERROR: invalid reference to the index variable of the iterator on line 183
   drivers/char/xillybus/xillybus_class.c:196:15-19: ERROR: invalid reference to the index variable of the iterator on line 183
   drivers/char/xillybus/xillybus_class.c:196:36-40: ERROR: invalid reference to the index variable of the iterator on line 183
   drivers/char/xillybus/xillybus_class.c:238:17-21: ERROR: invalid reference to the index variable of the iterator on line 225

vim +195 drivers/char/xillybus/xillybus_class.c

377c6b94ae2a5e9 Eli Billauer 2021-05-26  173  
377c6b94ae2a5e9 Eli Billauer 2021-05-26  174  void xillybus_cleanup_chrdev(void *private_data,
377c6b94ae2a5e9 Eli Billauer 2021-05-26  175  			     struct device *dev)
377c6b94ae2a5e9 Eli Billauer 2021-05-26  176  {
377c6b94ae2a5e9 Eli Billauer 2021-05-26  177  	int minor;
377c6b94ae2a5e9 Eli Billauer 2021-05-26  178  	struct xilly_unit *unit;
377c6b94ae2a5e9 Eli Billauer 2021-05-26  179  	bool found = false;
377c6b94ae2a5e9 Eli Billauer 2021-05-26  180  
377c6b94ae2a5e9 Eli Billauer 2021-05-26  181  	mutex_lock(&unit_mutex);
377c6b94ae2a5e9 Eli Billauer 2021-05-26  182  
377c6b94ae2a5e9 Eli Billauer 2021-05-26 @183  	list_for_each_entry(unit, &unit_list, list_entry)
377c6b94ae2a5e9 Eli Billauer 2021-05-26  184  		if (unit->private_data == private_data) {
377c6b94ae2a5e9 Eli Billauer 2021-05-26  185  			found = true;
377c6b94ae2a5e9 Eli Billauer 2021-05-26  186  			break;
377c6b94ae2a5e9 Eli Billauer 2021-05-26  187  		}
377c6b94ae2a5e9 Eli Billauer 2021-05-26  188  
377c6b94ae2a5e9 Eli Billauer 2021-05-26  189  	if (!found) {
377c6b94ae2a5e9 Eli Billauer 2021-05-26  190  		dev_err(dev, "Weird bug: Failed to find unit\n");
377c6b94ae2a5e9 Eli Billauer 2021-05-26  191  		mutex_unlock(&unit_mutex);
377c6b94ae2a5e9 Eli Billauer 2021-05-26  192  		return;
377c6b94ae2a5e9 Eli Billauer 2021-05-26  193  	}
377c6b94ae2a5e9 Eli Billauer 2021-05-26  194  
377c6b94ae2a5e9 Eli Billauer 2021-05-26 @195  	for (minor = unit->lowest_minor;
377c6b94ae2a5e9 Eli Billauer 2021-05-26  196  	     minor < (unit->lowest_minor + unit->num_nodes);
377c6b94ae2a5e9 Eli Billauer 2021-05-26  197  	     minor++)
377c6b94ae2a5e9 Eli Billauer 2021-05-26  198  		device_destroy(xillybus_class, MKDEV(unit->major, minor));
377c6b94ae2a5e9 Eli Billauer 2021-05-26  199  
377c6b94ae2a5e9 Eli Billauer 2021-05-26  200  	cdev_del(unit->cdev);
377c6b94ae2a5e9 Eli Billauer 2021-05-26  201  
377c6b94ae2a5e9 Eli Billauer 2021-05-26  202  	unregister_chrdev_region(MKDEV(unit->major, unit->lowest_minor),
377c6b94ae2a5e9 Eli Billauer 2021-05-26  203  				 unit->num_nodes);
377c6b94ae2a5e9 Eli Billauer 2021-05-26  204  
377c6b94ae2a5e9 Eli Billauer 2021-05-26  205  	dev_info(dev, "Removed %d device files.\n",
377c6b94ae2a5e9 Eli Billauer 2021-05-26  206  		 unit->num_nodes);
377c6b94ae2a5e9 Eli Billauer 2021-05-26  207  
377c6b94ae2a5e9 Eli Billauer 2021-05-26  208  	list_del(&unit->list_entry);
377c6b94ae2a5e9 Eli Billauer 2021-05-26  209  	kfree(unit);
377c6b94ae2a5e9 Eli Billauer 2021-05-26  210  
377c6b94ae2a5e9 Eli Billauer 2021-05-26  211  	mutex_unlock(&unit_mutex);
377c6b94ae2a5e9 Eli Billauer 2021-05-26  212  }
377c6b94ae2a5e9 Eli Billauer 2021-05-26  213  EXPORT_SYMBOL(xillybus_cleanup_chrdev);
377c6b94ae2a5e9 Eli Billauer 2021-05-26  214  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 38573 bytes --]

             reply	other threads:[~2021-05-26 13:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-26 13:22 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-05-26 10:03 [PATCH v5 0/2] Submission of XillyUSB driver eli.billauer
2021-05-26 10:03 ` [PATCH v5 1/2] char: xillybus: Move class-related functions to new xillybus_class.c eli.billauer

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=202105262151.pX7ua7pO-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild@lists.01.org \
    /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.