public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: AnandKumar.Santhanam@pmcs.com
Cc: pmchba@pmcs.com, linux-scsi@vger.kernel.org
Subject: re: [SCSI] pm80xx: Phy settings support for motherboard controller.
Date: Wed, 13 Apr 2016 14:24:54 +0300	[thread overview]
Message-ID: <20160413112454.GA25247@mwanda> (raw)

Hello Anand Kumar Santhanam,

The patch 279094079a44: "[SCSI] pm80xx: Phy settings support for
motherboard controller." from Sep 18, 2013, leads to the following
static checker warning:

	drivers/scsi/pm8001/pm80xx_hwi.c:4554 mpi_set_phy_profile_req()
	error: uninitialized symbol 'tag'.

drivers/scsi/pm8001/pm80xx_hwi.c
  4540  void mpi_set_phy_profile_req(struct pm8001_hba_info *pm8001_ha,
  4541          u32 operation, u32 phyid, u32 length, u32 *buf)
  4542  {
  4543          u32 tag , i, j = 0;
  4544          int rc;
  4545          struct set_phy_profile_req payload;
  4546          struct inbound_queue_table *circularQ;
  4547          u32 opc = OPC_INB_SET_PHY_PROFILE;
  4548  
  4549          memset(&payload, 0, sizeof(payload));
  4550          rc = pm8001_tag_alloc(pm8001_ha, &tag);
  4551          if (rc)
  4552                  PM8001_FAIL_DBG(pm8001_ha, pm8001_printk("Invalid tag\n"));
                                                                  ^^^^^^^^^^^^
Yup.

  4553          circularQ = &pm8001_ha->inbnd_q_tbl[0];
  4554          payload.tag = cpu_to_le32(tag);
                                          ^^^
Using invalid tag.

  4555          payload.ppc_phyid = (((operation & 0xF) << 8) | (phyid  & 0xFF));
  4556          PM8001_INIT_DBG(pm8001_ha,
  4557                  pm8001_printk(" phy profile command for phy %x ,length is %d\n",
  4558                          payload.ppc_phyid, length));
  4559          for (i = length; i < (length + PHY_DWORD_LENGTH - 1); i++) {
  4560                  payload.reserved[j] =  cpu_to_le32(*((u32 *)buf + i));
  4561                  j++;
  4562          }
  4563          rc = pm8001_mpi_build_cmd(pm8001_ha, circularQ, opc, &payload, 0);
  4564          if (rc)
  4565                  pm8001_tag_free(pm8001_ha, tag);
  4566  }


regards,
dan carpenter

             reply	other threads:[~2016-04-13 11:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-13 11:24 Dan Carpenter [this message]
2016-04-14 12:52 ` [SCSI] pm80xx: Phy settings support for motherboard controller Jack Wang
2016-04-28  0:03   ` Martin K. Petersen

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=20160413112454.GA25247@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=AnandKumar.Santhanam@pmcs.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=pmchba@pmcs.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox