All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: james.smart@emulex.com
Cc: linux-scsi@vger.kernel.org
Subject: re: [SCSI] lpfc 8.3.37: Provide support for FCoE protocol dual-chute (ULP) operation
Date: Tue, 5 Feb 2013 12:04:26 +0300	[thread overview]
Message-ID: <20130205090425.GA5941@elgon.mountain> (raw)

Hello James Smart,

The patch 962bc51b04b2: "[SCSI] lpfc 8.3.37: Provide support for FCoE
protocol dual-chute (ULP) operation" from Jan 3, 2013, leads to the
following warning:
"drivers/scsi/lpfc/lpfc_sli.c:12818 lpfc_wq_create()
	 warn: 0x800 is larger than 8 bits"

[ This is from a not ready for release Smatch check. ]

drivers/scsi/lpfc/lpfc_sli.c
 12818          if (phba->sli4_hba.fw_func_mode & LPFC_DUA_MODE)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
fw_func_mode is unsigned char.
LPFC_DUA_MODE is 0x800.
This condition is always false because 0xff & 0x800 is zero.

 12819                  bf_set(lpfc_mbx_wq_create_dua, &wq_create->u.request, 1);
 12820  
 12821          rc = lpfc_sli_issue_mbox(phba, mbox, MBX_POLL);
 12822          /* The IOCTL status is embedded in the mailbox subheader. */
 12823          shdr_status = bf_get(lpfc_mbox_hdr_status, &shdr->response);
 12824          shdr_add_status = bf_get(lpfc_mbox_hdr_add_status, &shdr->response);
 12825          if (shdr_status || shdr_add_status || rc) {
 12826                  lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
 12827                                  "2503 WQ_CREATE mailbox failed with "
 12828                                  "status x%x add_status x%x, mbx status x%x\n",
 12829                                  shdr_status, shdr_add_status, rc);
 12830                  status = -ENXIO;
 12831                  goto out;
 12832          }
 12833          wq->queue_id = bf_get(lpfc_mbx_wq_create_q_id, &wq_create->u.response);
 12834          if (wq->queue_id == 0xFFFF) {
 12835                  status = -ENXIO;
 12836                  goto out;
 12837          }
 12838          if (phba->sli4_hba.fw_func_mode & LPFC_DUA_MODE) {
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Same.

 12839                  wq->db_format = bf_get(lpfc_mbx_wq_create_db_format,
 12840                                         &wq_create->u.response);
 12841                  if ((wq->db_format != LPFC_DB_LIST_FORMAT) &&

regards,
dan carpenter


             reply	other threads:[~2013-02-05  9:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-05  9:04 Dan Carpenter [this message]
2013-02-13 17:07 ` [SCSI] lpfc 8.3.37: Provide support for FCoE protocol dual-chute (ULP) operation James Smart

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=20130205090425.GA5941@elgon.mountain \
    --to=dan.carpenter@oracle.com \
    --cc=james.smart@emulex.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.