tree: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git pm-sleep-core head: 3aa654e1e731ad8f8aff1a937e09fae14380b6e5 commit: f31f24f5fef92e6b50dffdd2c53d2d4c4c8c2fc9 [2/3] PM: sleep: core: Fold functions into their callers config: x86_64-defconfig (attached as .config) compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0 reproduce: git checkout f31f24f5fef92e6b50dffdd2c53d2d4c4c8c2fc9 # save the attached .config to linux build tree make ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot <lkp@xxxxxxxxx> All warnings (new ones prefixed by >>): In file included from include/linux/compiler_types.h:68:0, from <command-line>:0: drivers/base/power/main.c: In function 'device_resume_noirq': >> drivers/base/power/main.c:588:31: warning: initialization makes pointer from integer without a cast [-Wint-conversion] const char uninitialized_var(*info); ^ include/linux/compiler-gcc.h:65:34: note: in definition of macro 'uninitialized_var' #define uninitialized_var(x) x = x ^ drivers/base/power/main.c: In function 'device_resume_early': drivers/base/power/main.c:779:31: warning: initialization makes pointer from integer without a cast [-Wint-conversion] const char uninitialized_var(*info); ^ include/linux/compiler-gcc.h:65:34: note: in definition of macro 'uninitialized_var' #define uninitialized_var(x) x = x ^ drivers/base/power/main.c: In function '__device_suspend_noirq': drivers/base/power/main.c:1196:31: warning: initialization makes pointer from integer without a cast [-Wint-conversion] const char uninitialized_var(*info); ^ include/linux/compiler-gcc.h:65:34: note: in definition of macro 'uninitialized_var' #define uninitialized_var(x) x = x ^ drivers/base/power/main.c: In function '__device_suspend_late': drivers/base/power/main.c:1381:31: warning: initialization makes pointer from integer without a cast [-Wint-conversion] const char uninitialized_var(*info); ^ include/linux/compiler-gcc.h:65:34: note: in definition of macro 'uninitialized_var' #define uninitialized_var(x) x = x ^ drivers/base/power/main.c: In function 'device_resume_early': drivers/base/power/main.c:779:31: warning: 'info' is used uninitialized in this function [-Wuninitialized] const char uninitialized_var(*info); ^ drivers/base/power/main.c: In function 'device_resume_noirq': drivers/base/power/main.c:588:31: warning: 'info' is used uninitialized in this function [-Wuninitialized] const char uninitialized_var(*info); ^ drivers/base/power/main.c: In function '__device_suspend_noirq': drivers/base/power/main.c:1196:31: warning: 'info' is used uninitialized in this function [-Wuninitialized] const char uninitialized_var(*info); ^ drivers/base/power/main.c: In function '__device_suspend_late': drivers/base/power/main.c:1381:31: warning: 'info' is used uninitialized in this function [-Wuninitialized] const char uninitialized_var(*info); ^ vim +588 drivers/base/power/main.c 575 576 /** 577 * device_resume_noirq - Execute a "noirq resume" callback for given device. 578 * @dev: Device to handle. 579 * @state: PM transition of the system being carried out. 580 * @async: If true, the device is being resumed asynchronously. 581 * 582 * The driver of @dev will not receive interrupts while this function is being 583 * executed. 584 */ 585 static int device_resume_noirq(struct device *dev, pm_message_t state, bool async) 586 { 587 pm_callback_t callback = NULL; > 588 const char uninitialized_var(*info); 589 bool skip_resume; 590 int error = 0; 591 592 TRACE_DEVICE(dev); 593 TRACE_RESUME(0); 594 595 if (dev->power.syscore || dev->power.direct_complete) 596 goto Out; 597 598 if (!dev->power.is_noirq_suspended) 599 goto Out; 600 601 if (!dpm_wait_for_superior(dev, async)) 602 goto Out; 603 604 if (dev->pm_domain) { 605 info = "noirq power domain "; 606 callback = pm_noirq_op(&dev->pm_domain->ops, state); 607 } else if (dev->type && dev->type->pm) { 608 info = "noirq type "; 609 callback = pm_noirq_op(dev->type->pm, state); 610 } else if (dev->class && dev->class->pm) { 611 info = "noirq class "; 612 callback = pm_noirq_op(dev->class->pm, state); 613 } else if (dev->bus && dev->bus->pm) { 614 info = "noirq bus "; 615 callback = pm_noirq_op(dev->bus->pm, state); 616 } 617 if (callback) { 618 skip_resume = false; 619 goto Run; 620 } 621 622 skip_resume = dev_pm_may_skip_resume(dev); 623 if (skip_resume) 624 goto Skip; 625 626 /* 627 * If "freeze" driver callbacks have been skipped during hibernation, 628 * because the device was runtime-suspended in __device_suspend_late(), 629 * the corresponding "thaw" callbacks must be skipped too, because 630 * running them for a runtime-suspended device may not be valid. 631 */ 632 if (dev_pm_smart_suspend_and_suspended(dev) && 633 state.event == PM_EVENT_THAW) { 634 skip_resume = true; 635 goto Skip; 636 } 637 638 if (dev->driver && dev->driver->pm) { 639 info = "noirq driver "; 640 callback = pm_noirq_op(dev->driver->pm, state); 641 } 642 643 /* 644 * The device is going to be resumed, so set its PM-runtime status to 645 * "active" (that can be done for all devices regardless of whether or 646 * not PM-runtime is enabled for them). 647 */ 648 pm_runtime_set_active(dev); 649 650 Run: 651 error = dpm_run_callback(callback, dev, state, info); 652 653 Skip: 654 dev->power.is_noirq_suspended = false; 655 656 if (skip_resume) { 657 /* Make the next phases of resume skip the device. */ 658 dev->power.is_late_suspended = false; 659 dev->power.is_suspended = false; 660 /* 661 * The device is going to be left in suspend, but it might not 662 * have been in runtime suspend before the system suspended, so 663 * its runtime PM status needs to be updated to avoid confusing 664 * the runtime PM framework when runtime PM is enabled for the 665 * device again. 666 */ 667 pm_runtime_set_suspended(dev); 668 } 669 670 Out: 671 complete_all(&dev->power.completion); 672 TRACE_RESUME(error); 673 return error; 674 } 675 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip