* re: [SCSI] lpfc 8.3.37: Provide support for FCoE protocol dual-chute (ULP) operation
@ 2013-02-05 9:04 Dan Carpenter
2013-02-13 17:07 ` James Smart
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2013-02-05 9:04 UTC (permalink / raw)
To: james.smart; +Cc: linux-scsi
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
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [SCSI] lpfc 8.3.37: Provide support for FCoE protocol dual-chute (ULP) operation
2013-02-05 9:04 [SCSI] lpfc 8.3.37: Provide support for FCoE protocol dual-chute (ULP) operation Dan Carpenter
@ 2013-02-13 17:07 ` James Smart
0 siblings, 0 replies; 2+ messages in thread
From: James Smart @ 2013-02-13 17:07 UTC (permalink / raw)
To: Dan Carpenter; +Cc: linux-scsi
Dan,
Thanks for pointing this out. I'm addressing it as the first patch in
8.3.38, which I'll be pushing shortly.
-- james s
On 2/5/2013 4:04 AM, Dan Carpenter wrote:
> 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
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-02-13 17:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-05 9:04 [SCSI] lpfc 8.3.37: Provide support for FCoE protocol dual-chute (ULP) operation Dan Carpenter
2013-02-13 17:07 ` James Smart
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.