From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: drivers/scsi/pm8001/pm80xx_hwi.c:4844:58: warning: Same expression on both sides of '&'. [knownConditionTrueFalse]
Date: Wed, 08 Dec 2021 20:16:21 +0800 [thread overview]
Message-ID: <202112081912.a04On1SL-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 8094 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Ruksar Devadi <Ruksar.devadi@microchip.com>
CC: "Martin K. Petersen" <martin.petersen@oracle.com>
CC: Viswas G <Viswas.G@microchip.com>
CC: Ashokkumar N <Ashokkumar.N@microchip.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 2a987e65025e2b79c6d453b78cb5985ac6e5eb26
commit: 4f5deeb40f9cf721030a1bdfecb19584fca9091e scsi: pm80xx: Completing pending I/O after fatal error
date: 8 months ago
:::::: branch date: 12 hours ago
:::::: commit date: 8 months ago
compiler: powerpc-linux-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>> drivers/scsi/pm8001/pm80xx_hwi.c:4844:58: warning: Same expression on both sides of '&'. [knownConditionTrueFalse]
payload.dtype_dlr_mcn_ir_retry = cpu_to_le32((retryFlag & 0x01) |
^
drivers/scsi/pm8001/pm80xx_hwi.c:4804:17: note: 'retryFlag' is assigned value '1' here.
u8 retryFlag = 0x1;
^
drivers/scsi/pm8001/pm80xx_hwi.c:4844:58: note: Same expression on both sides of '&'.
payload.dtype_dlr_mcn_ir_retry = cpu_to_le32((retryFlag & 0x01) |
^
>> drivers/scsi/pm8001/pm8001_hwi.c:4489:51: warning: Same expression on both sides of '&'. [knownConditionTrueFalse]
payload.dtype_dlr_retry = cpu_to_le32((retryFlag & 0x01) |
^
drivers/scsi/pm8001/pm8001_hwi.c:4454:17: note: 'retryFlag' is assigned value '1' here.
u8 retryFlag = 0x1;
^
drivers/scsi/pm8001/pm8001_hwi.c:4489:51: note: Same expression on both sides of '&'.
payload.dtype_dlr_retry = cpu_to_le32((retryFlag & 0x01) |
^
vim +4844 drivers/scsi/pm8001/pm80xx_hwi.c
f5860992db55c9 Sakthivel K 2013-04-17 4790
6ad4a51764a032 Lee Jones 2020-07-21 4791 /*
f5860992db55c9 Sakthivel K 2013-04-17 4792 * see comments on pm8001_mpi_reg_resp.
f5860992db55c9 Sakthivel K 2013-04-17 4793 */
f5860992db55c9 Sakthivel K 2013-04-17 4794 static int pm80xx_chip_reg_dev_req(struct pm8001_hba_info *pm8001_ha,
f5860992db55c9 Sakthivel K 2013-04-17 4795 struct pm8001_device *pm8001_dev, u32 flag)
f5860992db55c9 Sakthivel K 2013-04-17 4796 {
f5860992db55c9 Sakthivel K 2013-04-17 4797 struct reg_dev_req payload;
f5860992db55c9 Sakthivel K 2013-04-17 4798 u32 opc;
f5860992db55c9 Sakthivel K 2013-04-17 4799 u32 stp_sspsmp_sata = 0x4;
f5860992db55c9 Sakthivel K 2013-04-17 4800 struct inbound_queue_table *circularQ;
f5860992db55c9 Sakthivel K 2013-04-17 4801 u32 linkrate, phy_id;
f5860992db55c9 Sakthivel K 2013-04-17 4802 int rc, tag = 0xdeadbeef;
f5860992db55c9 Sakthivel K 2013-04-17 4803 struct pm8001_ccb_info *ccb;
f5860992db55c9 Sakthivel K 2013-04-17 4804 u8 retryFlag = 0x1;
f5860992db55c9 Sakthivel K 2013-04-17 4805 u16 firstBurstSize = 0;
f5860992db55c9 Sakthivel K 2013-04-17 4806 u16 ITNT = 2000;
f5860992db55c9 Sakthivel K 2013-04-17 4807 struct domain_device *dev = pm8001_dev->sas_device;
f5860992db55c9 Sakthivel K 2013-04-17 4808 struct domain_device *parent_dev = dev->parent;
f5860992db55c9 Sakthivel K 2013-04-17 4809 circularQ = &pm8001_ha->inbnd_q_tbl[0];
f5860992db55c9 Sakthivel K 2013-04-17 4810
f5860992db55c9 Sakthivel K 2013-04-17 4811 memset(&payload, 0, sizeof(payload));
f5860992db55c9 Sakthivel K 2013-04-17 4812 rc = pm8001_tag_alloc(pm8001_ha, &tag);
f5860992db55c9 Sakthivel K 2013-04-17 4813 if (rc)
f5860992db55c9 Sakthivel K 2013-04-17 4814 return rc;
f5860992db55c9 Sakthivel K 2013-04-17 4815 ccb = &pm8001_ha->ccb_info[tag];
f5860992db55c9 Sakthivel K 2013-04-17 4816 ccb->device = pm8001_dev;
f5860992db55c9 Sakthivel K 2013-04-17 4817 ccb->ccb_tag = tag;
f5860992db55c9 Sakthivel K 2013-04-17 4818 payload.tag = cpu_to_le32(tag);
f5860992db55c9 Sakthivel K 2013-04-17 4819
f5860992db55c9 Sakthivel K 2013-04-17 4820 if (flag == 1) {
f5860992db55c9 Sakthivel K 2013-04-17 4821 stp_sspsmp_sata = 0x02; /*direct attached sata */
f5860992db55c9 Sakthivel K 2013-04-17 4822 } else {
aa9f8328fc5146 James Bottomley 2013-05-07 4823 if (pm8001_dev->dev_type == SAS_SATA_DEV)
f5860992db55c9 Sakthivel K 2013-04-17 4824 stp_sspsmp_sata = 0x00; /* stp*/
aa9f8328fc5146 James Bottomley 2013-05-07 4825 else if (pm8001_dev->dev_type == SAS_END_DEVICE ||
aa9f8328fc5146 James Bottomley 2013-05-07 4826 pm8001_dev->dev_type == SAS_EDGE_EXPANDER_DEVICE ||
aa9f8328fc5146 James Bottomley 2013-05-07 4827 pm8001_dev->dev_type == SAS_FANOUT_EXPANDER_DEVICE)
f5860992db55c9 Sakthivel K 2013-04-17 4828 stp_sspsmp_sata = 0x01; /*ssp or smp*/
f5860992db55c9 Sakthivel K 2013-04-17 4829 }
924a3541eab0d2 John Garry 2019-06-10 4830 if (parent_dev && dev_is_expander(parent_dev->dev_type))
f5860992db55c9 Sakthivel K 2013-04-17 4831 phy_id = parent_dev->ex_dev.ex_phy->phy_id;
f5860992db55c9 Sakthivel K 2013-04-17 4832 else
f5860992db55c9 Sakthivel K 2013-04-17 4833 phy_id = pm8001_dev->attached_phy;
f5860992db55c9 Sakthivel K 2013-04-17 4834
f5860992db55c9 Sakthivel K 2013-04-17 4835 opc = OPC_INB_REG_DEV;
f5860992db55c9 Sakthivel K 2013-04-17 4836
f5860992db55c9 Sakthivel K 2013-04-17 4837 linkrate = (pm8001_dev->sas_device->linkrate < dev->port->linkrate) ?
f5860992db55c9 Sakthivel K 2013-04-17 4838 pm8001_dev->sas_device->linkrate : dev->port->linkrate;
f5860992db55c9 Sakthivel K 2013-04-17 4839
f5860992db55c9 Sakthivel K 2013-04-17 4840 payload.phyid_portid =
f5860992db55c9 Sakthivel K 2013-04-17 4841 cpu_to_le32(((pm8001_dev->sas_device->port->id) & 0xFF) |
f5860992db55c9 Sakthivel K 2013-04-17 4842 ((phy_id & 0xFF) << 8));
f5860992db55c9 Sakthivel K 2013-04-17 4843
f5860992db55c9 Sakthivel K 2013-04-17 @4844 payload.dtype_dlr_mcn_ir_retry = cpu_to_le32((retryFlag & 0x01) |
f5860992db55c9 Sakthivel K 2013-04-17 4845 ((linkrate & 0x0F) << 24) |
f5860992db55c9 Sakthivel K 2013-04-17 4846 ((stp_sspsmp_sata & 0x03) << 28));
f5860992db55c9 Sakthivel K 2013-04-17 4847 payload.firstburstsize_ITNexustimeout =
f5860992db55c9 Sakthivel K 2013-04-17 4848 cpu_to_le32(ITNT | (firstBurstSize * 0x10000));
f5860992db55c9 Sakthivel K 2013-04-17 4849
f5860992db55c9 Sakthivel K 2013-04-17 4850 memcpy(payload.sas_addr, pm8001_dev->sas_device->sas_addr,
f5860992db55c9 Sakthivel K 2013-04-17 4851 SAS_ADDR_SIZE);
f5860992db55c9 Sakthivel K 2013-04-17 4852
91a43fa61f102e peter chang 2019-11-14 4853 rc = pm8001_mpi_build_cmd(pm8001_ha, circularQ, opc, &payload,
91a43fa61f102e peter chang 2019-11-14 4854 sizeof(payload), 0);
5533abca06e071 Tomas Henzl 2014-07-09 4855 if (rc)
5533abca06e071 Tomas Henzl 2014-07-09 4856 pm8001_tag_free(pm8001_ha, tag);
f5860992db55c9 Sakthivel K 2013-04-17 4857
f5860992db55c9 Sakthivel K 2013-04-17 4858 return rc;
f5860992db55c9 Sakthivel K 2013-04-17 4859 }
f5860992db55c9 Sakthivel K 2013-04-17 4860
:::::: The code at line 4844 was first introduced by commit
:::::: f5860992db55c9e36b0f120dff73f0c34abe510d [SCSI] pm80xx: Added SPCv/ve specific hardware functionalities and relevant changes in common files
:::::: TO: Sakthivel K <Sakthivel.SaravananKamalRaju@pmcs.com>
:::::: CC: James Bottomley <JBottomley@Parallels.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
reply other threads:[~2021-12-08 12:16 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=202112081912.a04On1SL-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild@lists.01.org \
/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.