public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* re: mlx5_core: Fix PowerPC support
@ 2014-10-16 11:08 Dan Carpenter
  2014-10-19  8:09 ` Eli Cohen
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2014-10-16 11:08 UTC (permalink / raw)
  To: eli-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-10-20 15:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-16 11:08 mlx5_core: Fix PowerPC support Dan Carpenter
2014-10-19  8:09 ` Eli Cohen
2014-10-20 15:45   ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox