Hi Binbin, kernel test robot noticed the following build warnings: [auto build test WARNING on abelloni/rtc-next] [also build test WARNING on robh/for-next linus/master v6.3-rc6 next-20230412] [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#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Binbin-Zhou/dt-bindings-rtc-Subdivision-of-LS2X-RTC-compatible/20230413-155906 base: https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git rtc-next patch link: https://lore.kernel.org/r/09f381f445cfbcf857845f61d10238452037b2e8.1681370153.git.zhoubinbin%40loongson.cn patch subject: [PATCH V3 2/7] rtc: Add support for the Loongson-2K/LS7A RTC config: arm64-allyesconfig (https://download.01.org/0day-ci/archive/20230414/202304140202.URh2nrLx-lkp@xxxxxxxxx/config) compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project 9638da200e00bd069e6dd63604e14cbafede9324) 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 # install arm64 cross compiling tool for clang build # apt-get install binutils-aarch64-linux-gnu # https://github.com/intel-lab-lkp/linux/commit/30ef4691d0ab95241315bf9ba7cf20b7d549b071 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Binbin-Zhou/dt-bindings-rtc-Subdivision-of-LS2X-RTC-compatible/20230413-155906 git checkout 30ef4691d0ab95241315bf9ba7cf20b7d549b071 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/rtc/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@xxxxxxxxx> | Link: https://lore.kernel.org/oe-kbuild-all/202304140202.URh2nrLx-lkp@xxxxxxxxx/ All warnings (new ones prefixed by >>): >> drivers/rtc/rtc-ls2x.c:276:25: warning: cast to smaller integer type 'enum ls2x_pm_offset' from 'const void *' [-Wvoid-pointer-to-enum-cast] priv->pm_base = regs - (enum ls2x_pm_offset)device_get_match_data(dev); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 warning generated. vim +276 drivers/rtc/rtc-ls2x.c 249 250 static int ls2x_rtc_probe(struct platform_device *pdev) 251 { 252 int ret; 253 void __iomem *regs; 254 struct ls2x_rtc_priv *priv; 255 struct device *dev = &pdev->dev; 256 257 priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); 258 if (!priv) 259 return -ENOMEM; 260 261 regs = devm_platform_ioremap_resource(pdev, 0); 262 if (IS_ERR(regs)) 263 return dev_err_probe(dev, PTR_ERR(regs), 264 "devm_platform_ioremap_resource failed\n"); 265 266 priv->regmap = devm_regmap_init_mmio(dev, regs, 267 &ls2x_rtc_regmap_config); 268 if (IS_ERR(priv->regmap)) 269 return dev_err_probe(dev, PTR_ERR(priv->regmap), 270 "devm_regmap_init_mmio failed\n"); 271 272 device_init_wakeup(dev, 1); 273 spin_lock_init(&priv->lock); 274 platform_set_drvdata(pdev, priv); 275 > 276 priv->pm_base = regs - (enum ls2x_pm_offset)device_get_match_data(dev); 277 278 if (has_acpi_companion(dev)) 279 acpi_install_fixed_event_handler(ACPI_EVENT_RTC, 280 ls2x_rtc_handler, priv); 281 282 priv->rtcdev = devm_rtc_allocate_device(dev); 283 if (IS_ERR(priv->rtcdev)) 284 return dev_err_probe(dev, PTR_ERR(priv->rtcdev), 285 "devm_rtc_allocate_device failed\n"); 286 287 priv->rtcdev->ops = &ls2x_rtc_ops; 288 priv->rtcdev->range_min = RTC_TIMESTAMP_BEGIN_2000; 289 priv->rtcdev->range_max = RTC_TIMESTAMP_END_2099; 290 291 priv->irq = platform_get_irq(pdev, 0); 292 if (priv->irq < 0) 293 return dev_err_probe(dev, priv->irq, "platform_get_irq failed\n"); 294 295 ret = devm_request_irq(dev, priv->irq, ls2x_rtc_isr, 296 IRQF_TRIGGER_RISING, "ls2x-alarm", priv); 297 if (ret < 0) 298 return dev_err_probe(dev, ret, "Unable to request irq %d\n", 299 priv->irq); 300 301 return devm_rtc_register_device(priv->rtcdev); 302 } 303 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests