Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: jsmart2021@gmail.com
Cc: linux-scsi@vger.kernel.org
Subject: [bug report] scsi: elx: libefc_sli: Populate and post different WQEs
Date: Fri, 18 Jun 2021 12:15:29 +0300	[thread overview]
Message-ID: <YMxh0h8S7SX08yXp@mwanda> (raw)

Hello James Smart,

The patch 1628f5b4976f: "scsi: elx: libefc_sli: Populate and post
different WQEs" from Jun 1, 2021, leads to the following static
checker warning:

	drivers/scsi/elx/libefc_sli/sli4.c:2384 sli_xmit_els_rsp64_wqe()
	warn: AND to zero '0x20 & 0x0'

drivers/scsi/elx/libefc_sli/sli4.c
  2360                  els->flags2 |= SLI4_ELS_DBDE;
  2361          else
  2362                  els->flags2 |= SLI4_ELS_XBL;
  2363  
  2364          els->els_response_payload.bde_type_buflen =
  2365                  cpu_to_le32((SLI4_BDE_TYPE_VAL(64)) |
  2366                              (params->rsp_len & SLI4_BDE_LEN_MASK));
  2367          els->els_response_payload.u.data.low =
  2368                  cpu_to_le32(lower_32_bits(rsp->phys));
  2369          els->els_response_payload.u.data.high =
  2370                  cpu_to_le32(upper_32_bits(rsp->phys));
  2371  
  2372          els->els_response_payload_length = cpu_to_le32(params->rsp_len);
  2373  
  2374          els->xri_tag = cpu_to_le16(params->xri);
  2375  
  2376          els->class_byte |= SLI4_GENERIC_CLASS_CLASS_3;
  2377  
  2378          els->command = SLI4_WQE_ELS_RSP64;
  2379  
  2380          els->request_tag = cpu_to_le16(params->tag);
  2381  
  2382          els->ox_id = cpu_to_le16(params->ox_id);
  2383  
  2384          els->flags2 |= SLI4_ELS_IOD & SLI4_ELS_REQUEST64_DIR_WRITE;
                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This is zero.  Maybe it should be BIT(0)?

  2385  
  2386          els->flags2 |= SLI4_ELS_QOSD;
  2387  
  2388          els->cmd_type_wqec = SLI4_ELS_REQUEST64_CMD_GEN;
  2389  
  2390          els->cq_id = cpu_to_le16(SLI4_CQ_DEFAULT);
  2391  
  2392          if (params->rpi_registered) {
  2393                  els->ct_byte |=
  2394                          SLI4_GENERIC_CONTEXT_RPI << SLI4_ELS_CT_OFFSET;
  2395                  els->context_tag = cpu_to_le16(params->rpi);
  2396                  return 0;
  2397          }
  2398  
  2399          els->ct_byte |= SLI4_GENERIC_CONTEXT_VPI << SLI4_ELS_CT_OFFSET;

regards,
dan carpenter

                 reply	other threads:[~2021-06-18  9:15 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=YMxh0h8S7SX08yXp@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=jsmart2021@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox