All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Changyuan Lyu <changyuanl@google.com>,
	Jack Wang <jinpu.wang@cloud.ionos.com>,
	"James E . J . Bottomley" <jejb@linux.ibm.com>,
	"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: kbuild-all@lists.01.org, linux-scsi@vger.kernel.org,
	Vishakha Channapattan <vishakhavc@google.com>,
	Akshat Jain <akshatzen@google.com>,
	Igor Pylypiv <ipylypiv@google.com>,
	Changyuan Lyu <changyuanl@google.com>
Subject: Re: [PATCH v1 2/2] scsi: pm80xx: Add pm80xx_mpi_build_cmd tracepoint
Date: Wed, 27 Oct 2021 19:48:41 +0800	[thread overview]
Message-ID: <202110271908.VoNCCcBt-lkp@intel.com> (raw)
In-Reply-To: <20211020214207.1248986-3-changyuanl@google.com>

[-- Attachment #1: Type: text/plain, Size: 5401 bytes --]

Hi Changyuan,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on jejb-scsi/for-next v5.15-rc7 next-20211026]
[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]

url:    https://github.com/0day-ci/linux/commits/Changyuan-Lyu/This-patchset-adds-tracepoints-to-pm80xx/20211021-054356
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: alpha-randconfig-s032-20211027 (attached as .config)
compiler: alpha-linux-gcc (GCC) 11.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://github.com/0day-ci/linux/commit/b48fdd621388924781f93fff019ef42bd9f22c60
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Changyuan-Lyu/This-patchset-adds-tracepoints-to-pm80xx/20211021-054356
        git checkout b48fdd621388924781f93fff019ef42bd9f22c60
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=alpha 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)
>> drivers/scsi/pm8001/pm8001_hwi.c:1331:51: sparse: sparse: incorrect type in argument 6 (different base types) @@     expected unsigned int [usertype] ci @@     got restricted __le32 [usertype] consumer_index @@
   drivers/scsi/pm8001/pm8001_hwi.c:1331:51: sparse:     expected unsigned int [usertype] ci
   drivers/scsi/pm8001/pm8001_hwi.c:1331:51: sparse:     got restricted __le32 [usertype] consumer_index
   drivers/scsi/pm8001/pm8001_hwi.c:1866:36: sparse: sparse: invalid assignment: |=
   drivers/scsi/pm8001/pm8001_hwi.c:1866:36: sparse:    left side has type restricted __le32
   drivers/scsi/pm8001/pm8001_hwi.c:1866:36: sparse:    right side has type int
   drivers/scsi/pm8001/pm8001_hwi.c:4661:35: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le32 [addressable] [assigned] [usertype] ds_ads_m @@     got int @@
   drivers/scsi/pm8001/pm8001_hwi.c:4661:35: sparse:     expected restricted __le32 [addressable] [assigned] [usertype] ds_ads_m
   drivers/scsi/pm8001/pm8001_hwi.c:4661:35: sparse:     got int

vim +1331 drivers/scsi/pm8001/pm8001_hwi.c

  1307	
  1308	/**
  1309	 * pm8001_mpi_build_cmd- build the message queue for transfer, update the PI to
  1310	 * FW to tell the fw to get this message from IOMB.
  1311	 * @pm8001_ha: our hba card information
  1312	 * @circularQ: the inbound queue we want to transfer to HBA.
  1313	 * @opCode: the operation code represents commands which LLDD and fw recognized.
  1314	 * @payload: the command payload of each operation command.
  1315	 * @nb: size in bytes of the command payload
  1316	 * @responseQueue: queue to interrupt on w/ command response (if any)
  1317	 */
  1318	int pm8001_mpi_build_cmd(struct pm8001_hba_info *pm8001_ha,
  1319				 struct inbound_queue_table *circularQ,
  1320				 u32 opCode, void *payload, size_t nb,
  1321				 u32 responseQueue)
  1322	{
  1323		u32 Header = 0, hpriority = 0, bc = 1, category = 0x02;
  1324		void *pMessage;
  1325		unsigned long flags;
  1326		int q_index = circularQ - pm8001_ha->inbnd_q_tbl;
  1327		int rv;
  1328		u32 htag = le32_to_cpu(*(__le32 *)payload);
  1329	
  1330		trace_pm80xx_mpi_build_cmd(pm8001_ha->id, opCode, htag, q_index,
> 1331			circularQ->producer_idx, circularQ->consumer_index);
  1332	
  1333		WARN_ON(q_index >= PM8001_MAX_INB_NUM);
  1334		spin_lock_irqsave(&circularQ->iq_lock, flags);
  1335		rv = pm8001_mpi_msg_free_get(circularQ, pm8001_ha->iomb_size,
  1336				&pMessage);
  1337		if (rv < 0) {
  1338			pm8001_dbg(pm8001_ha, IO, "No free mpi buffer\n");
  1339			rv = -ENOMEM;
  1340			goto done;
  1341		}
  1342	
  1343		if (nb > (pm8001_ha->iomb_size - sizeof(struct mpi_msg_hdr)))
  1344			nb = pm8001_ha->iomb_size - sizeof(struct mpi_msg_hdr);
  1345		memcpy(pMessage, payload, nb);
  1346		if (nb + sizeof(struct mpi_msg_hdr) < pm8001_ha->iomb_size)
  1347			memset(pMessage + nb, 0, pm8001_ha->iomb_size -
  1348					(nb + sizeof(struct mpi_msg_hdr)));
  1349	
  1350		/*Build the header*/
  1351		Header = ((1 << 31) | (hpriority << 30) | ((bc & 0x1f) << 24)
  1352			| ((responseQueue & 0x3F) << 16)
  1353			| ((category & 0xF) << 12) | (opCode & 0xFFF));
  1354	
  1355		pm8001_write_32((pMessage - 4), 0, cpu_to_le32(Header));
  1356		/*Update the PI to the firmware*/
  1357		pm8001_cw32(pm8001_ha, circularQ->pi_pci_bar,
  1358			circularQ->pi_offset, circularQ->producer_idx);
  1359		pm8001_dbg(pm8001_ha, DEVIO,
  1360			   "INB Q %x OPCODE:%x , UPDATED PI=%d CI=%d\n",
  1361			   responseQueue, opCode, circularQ->producer_idx,
  1362			   circularQ->consumer_index);
  1363	done:
  1364		spin_unlock_irqrestore(&circularQ->iq_lock, flags);
  1365		return rv;
  1366	}
  1367	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 31741 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v1 2/2] scsi: pm80xx: Add pm80xx_mpi_build_cmd tracepoint
Date: Wed, 27 Oct 2021 19:48:41 +0800	[thread overview]
Message-ID: <202110271908.VoNCCcBt-lkp@intel.com> (raw)
In-Reply-To: <20211020214207.1248986-3-changyuanl@google.com>

[-- Attachment #1: Type: text/plain, Size: 5511 bytes --]

Hi Changyuan,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on jejb-scsi/for-next v5.15-rc7 next-20211026]
[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]

url:    https://github.com/0day-ci/linux/commits/Changyuan-Lyu/This-patchset-adds-tracepoints-to-pm80xx/20211021-054356
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: alpha-randconfig-s032-20211027 (attached as .config)
compiler: alpha-linux-gcc (GCC) 11.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://github.com/0day-ci/linux/commit/b48fdd621388924781f93fff019ef42bd9f22c60
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Changyuan-Lyu/This-patchset-adds-tracepoints-to-pm80xx/20211021-054356
        git checkout b48fdd621388924781f93fff019ef42bd9f22c60
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=alpha 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)
>> drivers/scsi/pm8001/pm8001_hwi.c:1331:51: sparse: sparse: incorrect type in argument 6 (different base types) @@     expected unsigned int [usertype] ci @@     got restricted __le32 [usertype] consumer_index @@
   drivers/scsi/pm8001/pm8001_hwi.c:1331:51: sparse:     expected unsigned int [usertype] ci
   drivers/scsi/pm8001/pm8001_hwi.c:1331:51: sparse:     got restricted __le32 [usertype] consumer_index
   drivers/scsi/pm8001/pm8001_hwi.c:1866:36: sparse: sparse: invalid assignment: |=
   drivers/scsi/pm8001/pm8001_hwi.c:1866:36: sparse:    left side has type restricted __le32
   drivers/scsi/pm8001/pm8001_hwi.c:1866:36: sparse:    right side has type int
   drivers/scsi/pm8001/pm8001_hwi.c:4661:35: sparse: sparse: incorrect type in assignment (different base types) @@     expected restricted __le32 [addressable] [assigned] [usertype] ds_ads_m @@     got int @@
   drivers/scsi/pm8001/pm8001_hwi.c:4661:35: sparse:     expected restricted __le32 [addressable] [assigned] [usertype] ds_ads_m
   drivers/scsi/pm8001/pm8001_hwi.c:4661:35: sparse:     got int

vim +1331 drivers/scsi/pm8001/pm8001_hwi.c

  1307	
  1308	/**
  1309	 * pm8001_mpi_build_cmd- build the message queue for transfer, update the PI to
  1310	 * FW to tell the fw to get this message from IOMB.
  1311	 * @pm8001_ha: our hba card information
  1312	 * @circularQ: the inbound queue we want to transfer to HBA.
  1313	 * @opCode: the operation code represents commands which LLDD and fw recognized.
  1314	 * @payload: the command payload of each operation command.
  1315	 * @nb: size in bytes of the command payload
  1316	 * @responseQueue: queue to interrupt on w/ command response (if any)
  1317	 */
  1318	int pm8001_mpi_build_cmd(struct pm8001_hba_info *pm8001_ha,
  1319				 struct inbound_queue_table *circularQ,
  1320				 u32 opCode, void *payload, size_t nb,
  1321				 u32 responseQueue)
  1322	{
  1323		u32 Header = 0, hpriority = 0, bc = 1, category = 0x02;
  1324		void *pMessage;
  1325		unsigned long flags;
  1326		int q_index = circularQ - pm8001_ha->inbnd_q_tbl;
  1327		int rv;
  1328		u32 htag = le32_to_cpu(*(__le32 *)payload);
  1329	
  1330		trace_pm80xx_mpi_build_cmd(pm8001_ha->id, opCode, htag, q_index,
> 1331			circularQ->producer_idx, circularQ->consumer_index);
  1332	
  1333		WARN_ON(q_index >= PM8001_MAX_INB_NUM);
  1334		spin_lock_irqsave(&circularQ->iq_lock, flags);
  1335		rv = pm8001_mpi_msg_free_get(circularQ, pm8001_ha->iomb_size,
  1336				&pMessage);
  1337		if (rv < 0) {
  1338			pm8001_dbg(pm8001_ha, IO, "No free mpi buffer\n");
  1339			rv = -ENOMEM;
  1340			goto done;
  1341		}
  1342	
  1343		if (nb > (pm8001_ha->iomb_size - sizeof(struct mpi_msg_hdr)))
  1344			nb = pm8001_ha->iomb_size - sizeof(struct mpi_msg_hdr);
  1345		memcpy(pMessage, payload, nb);
  1346		if (nb + sizeof(struct mpi_msg_hdr) < pm8001_ha->iomb_size)
  1347			memset(pMessage + nb, 0, pm8001_ha->iomb_size -
  1348					(nb + sizeof(struct mpi_msg_hdr)));
  1349	
  1350		/*Build the header*/
  1351		Header = ((1 << 31) | (hpriority << 30) | ((bc & 0x1f) << 24)
  1352			| ((responseQueue & 0x3F) << 16)
  1353			| ((category & 0xF) << 12) | (opCode & 0xFFF));
  1354	
  1355		pm8001_write_32((pMessage - 4), 0, cpu_to_le32(Header));
  1356		/*Update the PI to the firmware*/
  1357		pm8001_cw32(pm8001_ha, circularQ->pi_pci_bar,
  1358			circularQ->pi_offset, circularQ->producer_idx);
  1359		pm8001_dbg(pm8001_ha, DEVIO,
  1360			   "INB Q %x OPCODE:%x , UPDATED PI=%d CI=%d\n",
  1361			   responseQueue, opCode, circularQ->producer_idx,
  1362			   circularQ->consumer_index);
  1363	done:
  1364		spin_unlock_irqrestore(&circularQ->iq_lock, flags);
  1365		return rv;
  1366	}
  1367	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 31741 bytes --]

  reply	other threads:[~2021-10-27 11:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-20 21:42 [PATCH v1 0/2] This patchset adds tracepoints to pm80xx Changyuan Lyu
2021-10-20 21:42 ` [PATCH v1 1/2] scsi: pm80xx: Add tracepoints Changyuan Lyu
2021-10-20 21:42 ` [PATCH v1 2/2] scsi: pm80xx: Add pm80xx_mpi_build_cmd tracepoint Changyuan Lyu
2021-10-27 11:48   ` kernel test robot [this message]
2021-10-27 11:48     ` kernel test robot

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=202110271908.VoNCCcBt-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akshatzen@google.com \
    --cc=changyuanl@google.com \
    --cc=ipylypiv@google.com \
    --cc=jejb@linux.ibm.com \
    --cc=jinpu.wang@cloud.ionos.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=vishakhavc@google.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.