All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: re: qlcnic: 83xx data path routines
Date: Thu, 16 Oct 2014 13:45:43 +0000	[thread overview]
Message-ID: <20141016134543.GA17358@mwanda> (raw)

Hello Sony Chacko,

The patch 4be41e92f7c6: "qlcnic: 83xx data path routines" from Jan 1,
2013, leads to the following static checker warning:

	drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c:2201 qlcnic_83xx_process_rcv_ring_diag()
	warn: masking and shifting to zero

drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c
  2186  void qlcnic_83xx_process_rcv_ring_diag(struct qlcnic_host_sds_ring *sds_ring)
  2187  {
  2188          struct qlcnic_adapter *adapter = sds_ring->adapter;
  2189          struct status_desc *desc;
  2190          u64 sts_data[2];
  2191          int ring, opcode;
  2192          u32 consumer = sds_ring->consumer;
  2193  
  2194          desc = &sds_ring->desc_head[consumer];
  2195          sts_data[0] = le64_to_cpu(desc->status_desc_data[0]);
  2196          sts_data[1] = le64_to_cpu(desc->status_desc_data[1]);
  2197          opcode = qlcnic_83xx_opcode(sts_data[1]);
  2198          if (!opcode)
  2199                  return;
  2200  
  2201          ring = QLCNIC_FETCH_RING_ID(qlcnic_83xx_hndl(sts_data[0]));
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ring is always zero.  Probably it should be:
		ring = QLCNIC_FETCH_RING_ID(sts_data[0]);

  2202          qlcnic_83xx_process_rcv_diag(adapter, ring, sts_data);
  2203          desc = &sds_ring->desc_head[consumer];
  2204          desc->status_desc_data[0] = cpu_to_le64(STATUS_OWNER_PHANTOM);
  2205          consumer = get_next_index(consumer, sds_ring->num_desc);
  2206          sds_ring->consumer = consumer;
  2207          writel(consumer, sds_ring->crb_sts_consumer);
  2208  }

regards,
dan carpenter

             reply	other threads:[~2014-10-16 13:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-16 13:45 Dan Carpenter [this message]
2014-10-19  5:26 ` qlcnic: 83xx data path routines Sony Chacko

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=20141016134543.GA17358@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=kernel-janitors@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.