Re: [PATCH v2] kcov, usb, vhost: specify contexts for remote coverage sections

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andrey,

I love your patch! Yet something to improve:

[auto build test ERROR on usb/usb-testing]
[also build test ERROR on vhost/linux-next hnaz-linux-mm/master linus/master v5.9-rc8 next-20201009]
[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/Andrey-Konovalov/kcov-usb-vhost-specify-contexts-for-remote-coverage-sections/20201009-205923
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: x86_64-rhel (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/669e3ded7b025bc4f34c158e66974ff11f452a88
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Andrey-Konovalov/kcov-usb-vhost-specify-contexts-for-remote-coverage-sections/20201009-205923
        git checkout 669e3ded7b025bc4f34c158e66974ff11f452a88
        # save the attached .config to linux build tree
        make W=1 ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

   drivers/usb/core/hub.c: In function 'hub_event':
>> drivers/usb/core/hub.c:5526:48: error: 'KCOV_CONTEXT_TASK' undeclared (first use in this function)
    5526 |  kcov_remote_start_usb((u64)hdev->bus->busnum, KCOV_CONTEXT_TASK);
         |                                                ^~~~~~~~~~~~~~~~~
   drivers/usb/core/hub.c:5526:48: note: each undeclared identifier is reported only once for each function it appears in
--
   drivers/usb/core/hcd.c: In function '__usb_hcd_giveback_urb':
>> drivers/usb/core/hcd.c:1649:52: error: 'KCOV_CONTEXT_SOFTIRQ' undeclared (first use in this function)
    1649 |  kcov_remote_start_usb((u64)urb->dev->bus->busnum, KCOV_CONTEXT_SOFTIRQ);
         |                                                    ^~~~~~~~~~~~~~~~~~~~
   drivers/usb/core/hcd.c:1649:52: note: each undeclared identifier is reported only once for each function it appears in
--
   drivers/vhost/vhost.c: In function 'vhost_worker':
>> drivers/vhost/vhost.c:367:8: error: 'KCOV_CONTEXT_TASK' undeclared (first use in this function)
     367 |        KCOV_CONTEXT_TASK);
         |        ^~~~~~~~~~~~~~~~~
   drivers/vhost/vhost.c:367:8: note: each undeclared identifier is reported only once for each function it appears in

vim +/KCOV_CONTEXT_TASK +5526 drivers/usb/core/hub.c

  5510	
  5511	static void hub_event(struct work_struct *work)
  5512	{
  5513		struct usb_device *hdev;
  5514		struct usb_interface *intf;
  5515		struct usb_hub *hub;
  5516		struct device *hub_dev;
  5517		u16 hubstatus;
  5518		u16 hubchange;
  5519		int i, ret;
  5520	
  5521		hub = container_of(work, struct usb_hub, events);
  5522		hdev = hub->hdev;
  5523		hub_dev = hub->intfdev;
  5524		intf = to_usb_interface(hub_dev);
  5525	
> 5526		kcov_remote_start_usb((u64)hdev->bus->busnum, KCOV_CONTEXT_TASK);
  5527	
  5528		dev_dbg(hub_dev, "state %d ports %d chg %04x evt %04x\n",
  5529				hdev->state, hdev->maxchild,
  5530				/* NOTE: expects max 15 ports... */
  5531				(u16) hub->change_bits[0],
  5532				(u16) hub->event_bits[0]);
  5533	
  5534		/* Lock the device, then check to see if we were
  5535		 * disconnected while waiting for the lock to succeed. */
  5536		usb_lock_device(hdev);
  5537		if (unlikely(hub->disconnected))
  5538			goto out_hdev_lock;
  5539	
  5540		/* If the hub has died, clean up after it */
  5541		if (hdev->state == USB_STATE_NOTATTACHED) {
  5542			hub->error = -ENODEV;
  5543			hub_quiesce(hub, HUB_DISCONNECT);
  5544			goto out_hdev_lock;
  5545		}
  5546	
  5547		/* Autoresume */
  5548		ret = usb_autopm_get_interface(intf);
  5549		if (ret) {
  5550			dev_dbg(hub_dev, "Can't autoresume: %d\n", ret);
  5551			goto out_hdev_lock;
  5552		}
  5553	
  5554		/* If this is an inactive hub, do nothing */
  5555		if (hub->quiescing)
  5556			goto out_autopm;
  5557	
  5558		if (hub->error) {
  5559			dev_dbg(hub_dev, "resetting for error %d\n", hub->error);
  5560	
  5561			ret = usb_reset_device(hdev);
  5562			if (ret) {
  5563				dev_dbg(hub_dev, "error resetting hub: %d\n", ret);
  5564				goto out_autopm;
  5565			}
  5566	
  5567			hub->nerrors = 0;
  5568			hub->error = 0;
  5569		}
  5570	
  5571		/* deal with port status changes */
  5572		for (i = 1; i <= hdev->maxchild; i++) {
  5573			struct usb_port *port_dev = hub->ports[i - 1];
  5574	
  5575			if (test_bit(i, hub->event_bits)
  5576					|| test_bit(i, hub->change_bits)
  5577					|| test_bit(i, hub->wakeup_bits)) {
  5578				/*
  5579				 * The get_noresume and barrier ensure that if
  5580				 * the port was in the process of resuming, we
  5581				 * flush that work and keep the port active for
  5582				 * the duration of the port_event().  However,
  5583				 * if the port is runtime pm suspended
  5584				 * (powered-off), we leave it in that state, run
  5585				 * an abbreviated port_event(), and move on.
  5586				 */
  5587				pm_runtime_get_noresume(&port_dev->dev);
  5588				pm_runtime_barrier(&port_dev->dev);
  5589				usb_lock_port(port_dev);
  5590				port_event(hub, i);
  5591				usb_unlock_port(port_dev);
  5592				pm_runtime_put_sync(&port_dev->dev);
  5593			}
  5594		}
  5595	
  5596		/* deal with hub status changes */
  5597		if (test_and_clear_bit(0, hub->event_bits) == 0)
  5598			;	/* do nothing */
  5599		else if (hub_hub_status(hub, &hubstatus, &hubchange) < 0)
  5600			dev_err(hub_dev, "get_hub_status failed\n");
  5601		else {
  5602			if (hubchange & HUB_CHANGE_LOCAL_POWER) {
  5603				dev_dbg(hub_dev, "power change\n");
  5604				clear_hub_feature(hdev, C_HUB_LOCAL_POWER);
  5605				if (hubstatus & HUB_STATUS_LOCAL_POWER)
  5606					/* FIXME: Is this always true? */
  5607					hub->limited_power = 1;
  5608				else
  5609					hub->limited_power = 0;
  5610			}
  5611			if (hubchange & HUB_CHANGE_OVERCURRENT) {
  5612				u16 status = 0;
  5613				u16 unused;
  5614	
  5615				dev_dbg(hub_dev, "over-current change\n");
  5616				clear_hub_feature(hdev, C_HUB_OVER_CURRENT);
  5617				msleep(500);	/* Cool down */
  5618				hub_power_on(hub, true);
  5619				hub_hub_status(hub, &status, &unused);
  5620				if (status & HUB_STATUS_OVERCURRENT)
  5621					dev_err(hub_dev, "over-current condition\n");
  5622			}
  5623		}
  5624	
  5625	out_autopm:
  5626		/* Balance the usb_autopm_get_interface() above */
  5627		usb_autopm_put_interface_no_suspend(intf);
  5628	out_hdev_lock:
  5629		usb_unlock_device(hdev);
  5630	
  5631		/* Balance the stuff in kick_hub_wq() and allow autosuspend */
  5632		usb_autopm_put_interface(intf);
  5633		kref_put(&hub->kref, hub_release);
  5634	
  5635		kcov_remote_stop(KCOV_CONTEXT_TASK);
  5636	}
  5637	

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux