Hi Jacky, FYI, the error/warning still remains. tree: https://github.com/Freescale/linux-fslc 5.15-2.1.x-imx head: c4c56565f9a812fafee843d7a7248f4991a6b709 commit: 264ab88f12e93e8f2755792771f22da44c9ead9e [14787/18019] LF-6644: soc: imx: Only do lifecycle notify when enter mem mode config: h8300-randconfig-r005-20221127 compiler: h8300-linux-gcc (GCC) 12.1.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/Freescale/linux-fslc/commit/264ab88f12e93e8f2755792771f22da44c9ead9e git remote add freescale-fslc https://github.com/Freescale/linux-fslc git fetch --no-tags freescale-fslc 5.15-2.1.x-imx git checkout 264ab88f12e93e8f2755792771f22da44c9ead9e # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=h8300 SHELL=/bin/bash drivers/soc/imx/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot All errors (new ones prefixed by >>): In file included from include/linux/dev_printk.h:14, from include/linux/device.h:15, from include/linux/node.h:18, from include/linux/cpu.h:17, from drivers/soc/imx/rpmsg_life_cycle.c:6: include/linux/scatterlist.h: In function 'sg_set_buf': include/asm-generic/page.h:89:51: warning: ordered comparison of pointer with null pointer [-Wextra] 89 | #define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \ | ^~ include/linux/compiler.h:78:45: note: in definition of macro 'unlikely' 78 | # define unlikely(x) __builtin_expect(!!(x), 0) | ^ include/linux/scatterlist.h:143:9: note: in expansion of macro 'BUG_ON' 143 | BUG_ON(!virt_addr_valid(buf)); | ^~~~~~ include/linux/scatterlist.h:143:17: note: in expansion of macro 'virt_addr_valid' 143 | BUG_ON(!virt_addr_valid(buf)); | ^~~~~~~~~~~~~~~ drivers/soc/imx/rpmsg_life_cycle.c: In function 'rpmsg_lifecycle_pm_notify': >> drivers/soc/imx/rpmsg_life_cycle.c:126:13: error: 'pm_suspend_target_state' undeclared (first use in this function) 126 | if (pm_suspend_target_state != PM_SUSPEND_MEM) | ^~~~~~~~~~~~~~~~~~~~~~~ drivers/soc/imx/rpmsg_life_cycle.c:126:13: note: each undeclared identifier is reported only once for each function it appears in vim +/pm_suspend_target_state +126 drivers/soc/imx/rpmsg_life_cycle.c 119 120 static int __maybe_unused rpmsg_lifecycle_pm_notify(bool enter) 121 { 122 struct pm_rpmsg_data msg; 123 int ret; 124 125 /* Only need to do lifecycle notify when APD enter mem(HW PD) mode */ > 126 if (pm_suspend_target_state != PM_SUSPEND_MEM) 127 return 0; 128 129 msg.data = enter ? PM_RPMSG_SUSPEND : PM_RPMSG_ACTIVE; 130 msg.header.cate = IMX_RMPSG_LIFECYCLE; 131 msg.header.major = IMX_RMPSG_MAJOR; 132 msg.header.minor = IMX_RMPSG_MINOR; 133 msg.header.type = PM_RPMSG_TYPE; 134 msg.header.cmd = PM_RPMSG_MODE; 135 136 reinit_completion(&cmd_complete); 137 138 ret = rpmsg_send(life_cycle_rpdev->ept, &msg, sizeof(struct pm_rpmsg_data)); 139 if (ret) { 140 dev_err(&life_cycle_rpdev->dev, "rpmsg send failed:%d\n", ret); 141 return ret; 142 } 143 144 ret = wait_for_completion_timeout(&cmd_complete, 145 msecs_to_jiffies(RPMSG_TIMEOUT)); 146 if (!ret) { 147 dev_err(&life_cycle_rpdev->dev, "rpmsg_send timeout!\n"); 148 return -ETIMEDOUT; 149 } 150 151 return 0; 152 } 153 -- 0-DAY CI Kernel Test Service https://01.org/lkp