From: kernel test robot <lkp@intel.com>
To: Prajwal N <prajwal.n@oss.qualcomm.com>
Cc: oe-kbuild-all@lists.linux.dev, Anup Patel <anup@brainfault.org>
Subject: [avpatel:riscv_sbi_watchdog_v1 98/98] drivers/watchdog/riscv_sbi_wdt.c:327:30: sparse: sparse: incorrect type in assignment (different modifiers)
Date: Sun, 08 Nov 2026 21:43:34 +0100 [thread overview]
Message-ID: <202611082116.ghWYccqf-lkp@intel.com> (raw)
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-randconfig-r2304-20261108 (https://download.01.org/0day-ci/archive/20261108/202611082116.ghWYccqf-lkp@intel.com/config)
compiler: riscv64-linux-gcc (GCC) 11.5.0
sparse: v0.6.5-rc1-21-g84ec0658
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261108/202611082116.ghWYccqf-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/202611082116.ghWYccqf-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/watchdog/riscv_sbi_wdt.c:327:30: sparse: sparse: incorrect type in assignment (different modifiers) @@ expected struct imsic_global_config *imsic_global @@ got struct imsic_global_config const * @@
drivers/watchdog/riscv_sbi_wdt.c:327:30: sparse: expected struct imsic_global_config *imsic_global
drivers/watchdog/riscv_sbi_wdt.c:327:30: sparse: got struct imsic_global_config const *
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
reply other threads:[~2026-11-08 20:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202611082116.ghWYccqf-lkp@intel.com \
--to=lkp@intel.com \
--cc=anup@brainfault.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=prajwal.n@oss.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.