* [android-common:android14-kiwi-6.1 0/353] drivers/scsi/qla2xxx/qla_dfs.c:521:35: sparse: sparse: Using plain integer as NULL pointer
@ 2026-10-27 4:27 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-10-27 4:27 UTC (permalink / raw)
To: cros-kernel-buildreports; +Cc: oe-kbuild-all
tree: https://android.googlesource.com/kernel/common android14-kiwi-6.1
head: 6b915aa34a0d468d55e46535173b0d946dfcf9a5
commit: 57c029cab0d908942e3ed9ff9fd0361144d01944 [0/353] scsi: qla2xxx: Move FCE Trace buffer allocation to user control
config: x86_64-randconfig-2302-20261027 (https://download.01.org/0day-ci/archive/20261027/202610270548.R3vAPeSV-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
sparse: v0.6.5-rc1-1-gc4640450
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261027/202610270548.R3vAPeSV-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/202610270548.R3vAPeSV-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/scsi/qla2xxx/qla_dfs.c:521:35: sparse: sparse: Using plain integer as NULL pointer
vim +521 drivers/scsi/qla2xxx/qla_dfs.c
495
496 static ssize_t
497 qla2x00_dfs_fce_write(struct file *file, const char __user *buffer,
498 size_t count, loff_t *pos)
499 {
500 struct seq_file *s = file->private_data;
501 struct scsi_qla_host *vha = s->private;
502 struct qla_hw_data *ha = vha->hw;
503 char *buf;
504 int rc = 0;
505 unsigned long enable;
506
507 if (!IS_QLA25XX(ha) && !IS_QLA81XX(ha) && !IS_QLA83XX(ha) &&
508 !IS_QLA27XX(ha) && !IS_QLA28XX(ha)) {
509 ql_dbg(ql_dbg_user, vha, 0xd034,
510 "this adapter does not support FCE.");
511 return -EINVAL;
512 }
513
514 buf = memdup_user_nul(buffer, count);
515 if (IS_ERR(buf)) {
516 ql_dbg(ql_dbg_user, vha, 0xd037,
517 "fail to copy user buffer.");
518 return PTR_ERR(buf);
519 }
520
> 521 enable = kstrtoul(buf, 0, 0);
522 rc = count;
523
524 mutex_lock(&ha->fce_mutex);
525
526 if (enable) {
527 if (ha->flags.user_enabled_fce) {
528 mutex_unlock(&ha->fce_mutex);
529 goto out_free;
530 }
531 ha->flags.user_enabled_fce = 1;
532 if (!ha->fce) {
533 rc = qla2x00_alloc_fce_trace(vha);
534 if (rc) {
535 ha->flags.user_enabled_fce = 0;
536 mutex_unlock(&ha->fce_mutex);
537 goto out_free;
538 }
539
540 /* adjust fw dump buffer to take into account of this feature */
541 if (!ha->flags.fce_dump_buf_alloced)
542 qla2x00_alloc_fw_dump(vha);
543 }
544
545 if (!ha->flags.fce_enabled)
546 qla_enable_fce_trace(vha);
547
548 ql_dbg(ql_dbg_user, vha, 0xd045, "User enabled FCE .\n");
549 } else {
550 if (!ha->flags.user_enabled_fce) {
551 mutex_unlock(&ha->fce_mutex);
552 goto out_free;
553 }
554 ha->flags.user_enabled_fce = 0;
555 if (ha->flags.fce_enabled) {
556 qla2x00_disable_fce_trace(vha, NULL, NULL);
557 ha->flags.fce_enabled = 0;
558 }
559
560 qla2x00_free_fce_trace(ha);
561 /* no need to re-adjust fw dump buffer */
562
563 ql_dbg(ql_dbg_user, vha, 0xd04f, "User disabled FCE .\n");
564 }
565
566 mutex_unlock(&ha->fce_mutex);
567 out_free:
568 kfree(buf);
569 return rc;
570 }
571
--
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-10-27 4:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-27 4:27 [android-common:android14-kiwi-6.1 0/353] drivers/scsi/qla2xxx/qla_dfs.c:521:35: sparse: sparse: Using plain integer as NULL pointer kernel test robot
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.