All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/2] Submission of XillyUSB driver
@ 2021-05-26 10:03 eli.billauer
  2021-05-26 10:03 ` [PATCH v5 1/2] char: xillybus: Move class-related functions to new xillybus_class.c eli.billauer
  2021-05-26 10:03 ` [PATCH v5 2/2] char: xillybus: Add driver for XillyUSB (Xillybus variant for USB) eli.billauer
  0 siblings, 2 replies; 7+ messages in thread
From: eli.billauer @ 2021-05-26 10:03 UTC (permalink / raw)
  To: gregkh, arnd; +Cc: linux-kernel, linux-usb, Eli Billauer

From: Eli Billauer <eli.billauer@gmail.com>

This is a resubmission of the XillyUSB driver, which is the USB
variant of the existing Xillybus driver.

Because these driver share some API related functions, this submission
consists of two patches:

(1) A patch moving away Xillybus' class related functions to a
    separate module file.
(2) A patch adding the new XillyUSB driver, based upon this new
    separate module.

Thanks,
   Eli

Eli Billauer (2):
  char: xillybus: Move class-related functions to new xillybus_class.c
  char: xillybus: Add driver for XillyUSB (Xillybus variant for USB)

 drivers/char/xillybus/Kconfig          |   22 +-
 drivers/char/xillybus/Makefile         |    2 +
 drivers/char/xillybus/xillybus.h       |   10 +-
 drivers/char/xillybus/xillybus_class.c |  263 +++
 drivers/char/xillybus/xillybus_class.h |   30 +
 drivers/char/xillybus/xillybus_core.c  |  181 +-
 drivers/char/xillybus/xillyusb.c       | 2260 ++++++++++++++++++++++++
 7 files changed, 2599 insertions(+), 169 deletions(-)
 create mode 100644 drivers/char/xillybus/xillybus_class.c
 create mode 100644 drivers/char/xillybus/xillybus_class.h
 create mode 100644 drivers/char/xillybus/xillyusb.c

-- 
2.17.1


^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: [PATCH v5 1/2] char: xillybus: Move class-related functions to new xillybus_class.c
@ 2021-05-26 13:22 kernel test robot
  0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2021-05-26 13:22 UTC (permalink / raw)
  To: kbuild

[-- 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 --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-05-28  9:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2021-05-26 10:03 ` [PATCH v5 2/2] char: xillybus: Add driver for XillyUSB (Xillybus variant for USB) eli.billauer
2021-05-27 12:00   ` Greg KH
2021-05-27 12:12   ` Greg KH
2021-05-28  9:08     ` Eli Billauer
2021-05-26 13:22 [PATCH v5 1/2] char: xillybus: Move class-related functions to new xillybus_class.c kernel test robot

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.