* [avpatel:riscv_sbi_watchdog_v1 98/98] drivers/watchdog/riscv_sbi_wdt.c:327:16: error: assigning to 'struct imsic_global_config *' from 'const struct imsic_global_config *' discards qualifiers
@ 2026-11-08 22:18 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-11-08 22:18 UTC (permalink / raw)
To: Prajwal N; +Cc: llvm, oe-kbuild-all, Anup Patel
tree: https://github.com/avpatel/linux.git riscv_sbi_watchdog_v1
head: 929bf13433e242a3f255f463b2fb44633e102e0d
commit: 929bf13433e242a3f255f463b2fb44633e102e0d [98/98] drivers/watchdog: Add RISC-V SBI watchdog driver
config: riscv-defconfig (https://download.01.org/0day-ci/archive/20261109/202611090657.vj0OMmgn-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project fc9576e3b179738d99c5babe5cd9d6c1f883e0db)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261109/202611090657.vj0OMmgn-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202611090657.vj0OMmgn-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/watchdog/riscv_sbi_wdt.c:327:16: error: assigning to 'struct imsic_global_config *' from 'const struct imsic_global_config *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
327 | imsic_global = imsic_get_global_config();
| ^ ~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
vim +327 drivers/watchdog/riscv_sbi_wdt.c
298
299 static int sbiwdt_probe(struct platform_device *pdev)
300 {
301 struct sbiwdt *wdt;
302 struct imsic_global_config *imsic_global;
303 struct irq_domain *msi_domain;
304 struct device *dev = &pdev->dev;
305 int rc;
306
307 /* Allocate memory for the global watchdog structure */
308 wdt = devm_kzalloc(dev, sizeof(*wdt), GFP_KERNEL);
309 if (!wdt)
310 return -ENOMEM;
311
312 platform_set_drvdata(pdev, wdt);
313 watchdog_set_drvdata(&wdt->wdd, wdt);
314
315 /* Initialiaze watchdog attributes */
316 rc = sbiwdt_init_attributes(wdt);
317 if (rc) {
318 dev_err(dev, "Failed to read SBI watchdog attributes: %d\n", rc);
319 return rc;
320 }
321
322 wdt->wdd.info = &sbiwdt_info;
323 wdt->wdd.ops = &sbiwdt_ops;
324
325 /* Setup MSI if the capability is available */
326 if (wdt->attrs.wdt_capability & SBI_WDT_CAP_MSI_SUPPORT_MASK) {
> 327 imsic_global = imsic_get_global_config();
328 if (!imsic_global) {
329 dev_err(dev, "IMSIC firmware node is unavailable\n");
330 return -ENODEV;
331 }
332
333 msi_domain = irq_find_matching_fwnode(imsic_global->fwnode,
334 DOMAIN_BUS_PLATFORM_MSI);
335
336 if (!msi_domain) {
337 dev_err(dev, "IMSIC platform MSI domain is unavailable\n");
338 return -ENODEV;
339 }
340
341 dev_set_msi_domain(&pdev->dev, msi_domain);
342
343 /* MSI setup*/
344 rc = platform_device_msi_init_and_alloc_irqs(dev, 1, sbiwdt_msi_write);
345 if (rc) {
346 dev_err(dev, "Failed to allocate MSIs\n");
347 return rc;
348 }
349
350 wdt->virq = msi_get_virq(dev, 0);
351 if (!wdt->virq) {
352 dev_err(dev, "Failed to get MSI virtual IRQ: %d\n", wdt->virq);
353 return wdt->virq;
354 }
355
356 rc = devm_request_irq(dev, wdt->virq,
357 sbiwdt_pretimeout_handler,
358 0, "sbiwdt-pretimeout", wdt);
359 if (rc) {
360 dev_err(dev, "Failed to request pretimeout IRQ: %d\n", rc);
361 return rc;
362 }
363 }
364
365 rc = devm_watchdog_register_device(dev, &wdt->wdd);
366 if (rc) {
367 dev_err(dev, "Failed to register RISC-V SBI watchdog device\n");
368 return rc;
369 }
370
371 dev_info(&pdev->dev, "RISC-V SBI Watchdog registered\n");
372
373 return 0;
374 }
375
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-08 22:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-08 22:18 [avpatel:riscv_sbi_watchdog_v1 98/98] drivers/watchdog/riscv_sbi_wdt.c:327:16: error: assigning to 'struct imsic_global_config *' from 'const struct imsic_global_config *' discards qualifiers kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox