Content-Type: multipart/mixed; boundary="===============2582719714978193202==" MIME-Version: 1.0 From: kbuild test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH v4 7/8] usb: mausb_host: MA-USB PAL events processing Date: Sun, 05 Apr 2020 00:07:08 +0800 Message-ID: <202004050038.meqL6HAk%lkp@intel.com> In-Reply-To: <20200327152614.26833-8-vladimir.stankovic@displaylink.com> List-Id: --===============2582719714978193202== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi, I love your patch! Perhaps something to improve: [auto build test WARNING on usb/usb-testing] [also build test WARNING on balbi-usb/next peter.chen-usb/ci-for-usb-next l= inus/master linux/master v5.6 next-20200403] [if your patch is applied to the wrong git tree, please drop us a note to h= elp improve the system. BTW, we also suggest to use '--base' option to specify = the base tree in git format-patch, please see https://stackoverflow.com/a/37406= 982] url: https://github.com/0day-ci/linux/commits/vladimir-stankovic-display= link-com/Add-MA-USB-Host-driver/20200328-042436 base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-= testing If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot coccinelle warnings: (new ones prefixed by >>) >> drivers/usb/mausb_host/utils.c:209:1-18: ERROR: nested lock+irqsave that= reuses flags from line 201. -- >> drivers/usb/mausb_host/hpal_events.c:86:46-49: ERROR: reference preceded= by free on line 85 vim +209 drivers/usb/mausb_host/utils.c 182 = 183 static ssize_t mausb_file_write(struct file *filp, const char __user= *buffer, 184 size_t size, loff_t *offset) 185 { 186 ssize_t num_of_bytes_to_write =3D 187 sizeof(struct mausb_events_notification); 188 struct mausb_events_notification notification; 189 unsigned long flags; 190 struct mausb_device *dev; 191 = 192 if (size !=3D (size_t)num_of_bytes_to_write) { 193 mausb_pr_alert("Different expected bytes to write (%ld) from actua= l size (%ld)", 194 num_of_bytes_to_write, size); 195 return MAUSB_DRIVER_WRITE_ERROR; 196 } 197 = 198 if (copy_from_user(¬ification, buffer, size)) 199 return MAUSB_DRIVER_WRITE_ERROR; 200 = > 201 spin_lock_irqsave(&mss.lock, flags); 202 dev =3D mausb_get_dev_from_addr_unsafe(notification.madev_addr); 203 = 204 if (!dev) { 205 spin_unlock_irqrestore(&mss.lock, flags); 206 return 0; 207 } 208 = > 209 spin_lock_irqsave(&dev->num_of_user_events_lock, flags); 210 dev->num_of_user_events +=3D notification.num_of_events; 211 dev->num_of_completed_events +=3D notification.num_of_completed_eve= nts; 212 spin_unlock_irqrestore(&dev->num_of_user_events_lock, flags); 213 = 214 queue_work(dev->workq, &dev->work); 215 spin_unlock_irqrestore(&mss.lock, flags); 216 = 217 return num_of_bytes_to_write; 218 } 219 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============2582719714978193202==--