net/qede/base: fix FreeBSD build
authorRasesh Mody <rasesh.mody@cavium.com>
Mon, 23 Jan 2017 05:02:38 +0000 (21:02 -0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 30 Jan 2017 21:18:26 +0000 (22:18 +0100)
commit679fe2e4262add3e92a043b7fe6e738c7339394b
treef75749d1c8244229470117d0fef82e7717021574
parenta67323e49c47380604c0dece509ffd9b7e58cfc3
net/qede/base: fix FreeBSD build

This patch addresses compilation errors on FreeBSD with clang 3.8.0.

drivers/net/qede/base/ecore_cxt.c:1257:2: error:
     shifting a negative signed value is undefined
          SET_FIELD(cdu_params, CDUC_NCIB, elems_per_page);
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/qede/base/ecore.h:82:27: note: expanded from macro 'SET_FIELD'
          (value) &= ~(name##_MASK << name##_SHIFT);
                    ~~~~~~~~~~~ ^

Fixes: ec94dbc57362 ("qede: add base driver")
Cc: stable@dpdk.org
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
Tested-by: Andrew Rybchenko <arybchenko@solarflare.com>
drivers/net/qede/base/ecore_init_fw_funcs.c
drivers/net/qede/base/reg_addr.h