All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: cros-kernel-buildreports@googlegroups.com
Cc: oe-kbuild-all@lists.linux.dev
Subject: [android-common:android14-kiwi-6.1 0/353] drivers/scsi/qla2xxx/qla_dfs.c:521:35: sparse: sparse: Using plain integer as NULL pointer
Date: Tue, 27 Oct 2026 05:27:24 +0100	[thread overview]
Message-ID: <202610270548.R3vAPeSV-lkp@intel.com> (raw)

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

                 reply	other threads:[~2026-10-27  4:28 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=202610270548.R3vAPeSV-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=cros-kernel-buildreports@googlegroups.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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.