Hi Anchal, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on linus/master] [also build test WARNING on v5.7-rc6] [cannot apply to xen-tip/linux-next tip/irq/core tip/auto-latest next-20200519] [if your patch is applied to the wrong git tree, please drop us a note to help 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/37406982] url: https://github.com/0day-ci/linux/commits/Anchal-Agarwal/Fix-PM-hibernation-in-Xen-guests/20200520-073211 base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 03fb3acae4be8a6b680ffedb220a8b6c07260b40 config: x86_64-allmodconfig (attached as .config) reproduce: # apt-get install sparse # sparse version: v0.6.1-193-gb8fad4bc-dirty # save the attached .config to linux build tree make C=1 ARCH=x86_64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' :::::: branch date: 11 hours ago :::::: commit date: 11 hours ago If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot sparse warnings: (new ones prefixed by >>) >> drivers/block/xen-blkfront.c:2700:0: sparse: sparse: missing terminating " character drivers/block/xen-blkfront.c:2701:0: sparse: sparse: missing terminating " character drivers/block/xen-blkfront.c:2700:25: sparse: sparse: Expected ) in function call drivers/block/xen-blkfront.c:2700:25: sparse: sparse: got The # https://github.com/0day-ci/linux/commit/1997467d18e784a64ee0fe00875492e9605f6147 git remote add linux-review https://github.com/0day-ci/linux git remote update linux-review git checkout 1997467d18e784a64ee0fe00875492e9605f6147 vim +2700 drivers/block/xen-blkfront.c 9f27ee59503865 Jeremy Fitzhardinge 2007-07-17 2672 1997467d18e784 Munehisa Kamata 2020-05-19 2673 static int blkfront_freeze(struct xenbus_device *dev) 1997467d18e784 Munehisa Kamata 2020-05-19 2674 { 1997467d18e784 Munehisa Kamata 2020-05-19 2675 unsigned int i; 1997467d18e784 Munehisa Kamata 2020-05-19 2676 struct blkfront_info *info = dev_get_drvdata(&dev->dev); 1997467d18e784 Munehisa Kamata 2020-05-19 2677 struct blkfront_ring_info *rinfo; 1997467d18e784 Munehisa Kamata 2020-05-19 2678 /* This would be reasonable timeout as used in xenbus_dev_shutdown() */ 1997467d18e784 Munehisa Kamata 2020-05-19 2679 unsigned int timeout = 5 * HZ; 1997467d18e784 Munehisa Kamata 2020-05-19 2680 unsigned long flags; 1997467d18e784 Munehisa Kamata 2020-05-19 2681 int err = 0; 1997467d18e784 Munehisa Kamata 2020-05-19 2682 1997467d18e784 Munehisa Kamata 2020-05-19 2683 info->connected = BLKIF_STATE_FREEZING; 1997467d18e784 Munehisa Kamata 2020-05-19 2684 1997467d18e784 Munehisa Kamata 2020-05-19 2685 blk_mq_freeze_queue(info->rq); 1997467d18e784 Munehisa Kamata 2020-05-19 2686 blk_mq_quiesce_queue(info->rq); 1997467d18e784 Munehisa Kamata 2020-05-19 2687 1997467d18e784 Munehisa Kamata 2020-05-19 2688 for_each_rinfo(info, rinfo, i) { 1997467d18e784 Munehisa Kamata 2020-05-19 2689 /* No more gnttab callback work. */ 1997467d18e784 Munehisa Kamata 2020-05-19 2690 gnttab_cancel_free_callback(&rinfo->callback); 1997467d18e784 Munehisa Kamata 2020-05-19 2691 /* Flush gnttab callback work. Must be done with no locks held. */ 1997467d18e784 Munehisa Kamata 2020-05-19 2692 flush_work(&rinfo->work); 1997467d18e784 Munehisa Kamata 2020-05-19 2693 } 1997467d18e784 Munehisa Kamata 2020-05-19 2694 1997467d18e784 Munehisa Kamata 2020-05-19 2695 for_each_rinfo(info, rinfo, i) { 1997467d18e784 Munehisa Kamata 2020-05-19 2696 spin_lock_irqsave(&rinfo->ring_lock, flags); 1997467d18e784 Munehisa Kamata 2020-05-19 2697 if (RING_FULL(&rinfo->ring) 1997467d18e784 Munehisa Kamata 2020-05-19 2698 || RING_HAS_UNCONSUMED_RESPONSES(&rinfo->ring)) { 1997467d18e784 Munehisa Kamata 2020-05-19 2699 xenbus_dev_error(dev, err, "Hibernation Failed. 1997467d18e784 Munehisa Kamata 2020-05-19 @2700 The ring is still busy"); 1997467d18e784 Munehisa Kamata 2020-05-19 2701 info->connected = BLKIF_STATE_CONNECTED; 1997467d18e784 Munehisa Kamata 2020-05-19 2702 spin_unlock_irqrestore(&rinfo->ring_lock, flags); 1997467d18e784 Munehisa Kamata 2020-05-19 2703 return -EBUSY; 1997467d18e784 Munehisa Kamata 2020-05-19 2704 } 1997467d18e784 Munehisa Kamata 2020-05-19 2705 spin_unlock_irqrestore(&rinfo->ring_lock, flags); 1997467d18e784 Munehisa Kamata 2020-05-19 2706 } 1997467d18e784 Munehisa Kamata 2020-05-19 2707 /* Kick the backend to disconnect */ 1997467d18e784 Munehisa Kamata 2020-05-19 2708 xenbus_switch_state(dev, XenbusStateClosing); 1997467d18e784 Munehisa Kamata 2020-05-19 2709 1997467d18e784 Munehisa Kamata 2020-05-19 2710 /* 1997467d18e784 Munehisa Kamata 2020-05-19 2711 * We don't want to move forward before the frontend is diconnected 1997467d18e784 Munehisa Kamata 2020-05-19 2712 * from the backend cleanly. 1997467d18e784 Munehisa Kamata 2020-05-19 2713 */ 1997467d18e784 Munehisa Kamata 2020-05-19 2714 timeout = wait_for_completion_timeout(&info->wait_backend_disconnected, 1997467d18e784 Munehisa Kamata 2020-05-19 2715 timeout); 1997467d18e784 Munehisa Kamata 2020-05-19 2716 if (!timeout) { 1997467d18e784 Munehisa Kamata 2020-05-19 2717 err = -EBUSY; 1997467d18e784 Munehisa Kamata 2020-05-19 2718 xenbus_dev_error(dev, err, "Freezing timed out;" 1997467d18e784 Munehisa Kamata 2020-05-19 2719 "the device may become inconsistent state"); 1997467d18e784 Munehisa Kamata 2020-05-19 2720 } 1997467d18e784 Munehisa Kamata 2020-05-19 2721 1997467d18e784 Munehisa Kamata 2020-05-19 2722 return err; 1997467d18e784 Munehisa Kamata 2020-05-19 2723 } 1997467d18e784 Munehisa Kamata 2020-05-19 2724 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org