public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: eli-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: re: mlx5_core: Fix PowerPC support
Date: Thu, 16 Oct 2014 14:08:52 +0300	[thread overview]
Message-ID: <20141016110852.GA16271@mwanda> (raw)

Hello Eli Cohen,

The patch 05bdb2ab6b09: "mlx5_core: Fix PowerPC support" from Jan 14,
2014, leads to the following static checker warning:

	drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c:225 free_4k()
	warn: right shifting to zero

drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c
   214  static void free_4k(struct mlx5_core_dev *dev, u64 addr)
   215  {
   216          struct fw_page *fwp;
   217          int n;
   218  
   219          fwp = find_fw_page(dev, addr & PAGE_MASK);
   220          if (!fwp) {
   221                  mlx5_core_warn(dev, "page not found\n");
   222                  return;
   223          }
   224  
   225          n = (addr & ~PAGE_MASK) >> MLX5_ADAPTER_PAGE_SHIFT;

Maybe n = addr >> MLX5_ADAPTER_PAGE_SHIFT; was intended?  (Totally
random guess).

   226          fwp->free_count++;
   227          set_bit(n, &fwp->bitmask);


regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

             reply	other threads:[~2014-10-16 11:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-16 11:08 Dan Carpenter [this message]
2014-10-19  8:09 ` mlx5_core: Fix PowerPC support Eli Cohen
2014-10-20 15:45   ` Dan Carpenter

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=20141016110852.GA16271@mwanda \
    --to=dan.carpenter-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
    --cc=eli-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.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