From: Dan Carpenter <dan.carpenter@oracle.com>
To: james.smart@avagotech.com
Cc: linux-scsi@vger.kernel.org
Subject: re: lpfc: Modularize and cleanup FDMI code in driver
Date: Mon, 1 Feb 2016 14:01:29 +0300 [thread overview]
Message-ID: <20160201110129.GA24069@mwanda> (raw)
Hello James Smart,
The patch 4258e98ee386: "lpfc: Modularize and cleanup FDMI code in
driver" from Dec 16, 2015, leads to the following static checker
warning:
drivers/scsi/lpfc/lpfc_ct.c:2547 lpfc_fdmi_cmd()
error: __memcpy() '&rh->rpl.pe' too small (4 vs 8)
drivers/scsi/lpfc/lpfc_ct.c
2534 /* Next fill in the specific FDMI cmd information */
2535 switch (cmdcode) {
2536 case SLI_MGMT_RHAT:
2537 case SLI_MGMT_RHBA:
2538 rh = (struct lpfc_fdmi_reg_hba *)&CtReq->un.PortID;
2539 /* HBA Identifier */
2540 memcpy(&rh->hi.PortName, &phba->pport->fc_sparam.portName,
2541 sizeof(struct lpfc_name));
2542
2543 if (cmdcode == SLI_MGMT_RHBA) {
2544 /* Registered Port List */
2545 /* One entry (port) per adapter */
2546 rh->rpl.EntryCnt = cpu_to_be32(1);
2547 memcpy(&rh->rpl.pe, &phba->pport->fc_sparam.portName,
^^^^^^^^^^^
.pe is a u32.
2548 sizeof(struct lpfc_name));
^^^^^^^^^^^^^^^^^^^^^^^^
lpfc_name is an 8 byte union.
2549
regards,
dan carpenter
next reply other threads:[~2016-02-01 11:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-01 11:01 Dan Carpenter [this message]
2016-02-11 15:07 ` lpfc: Modularize and cleanup FDMI code in driver 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=20160201110129.GA24069@mwanda \
--to=dan.carpenter@oracle.com \
--cc=james.smart@avagotech.com \
--cc=linux-scsi@vger.kernel.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.