net/sfc/base: fix warnings from VS2015 C compiler (C4310)
authorAndrew Lee <alee@solarflare.com>
Thu, 16 Nov 2017 08:04:31 +0000 (08:04 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 16 Jan 2018 17:47:49 +0000 (18:47 +0100)
Fix level 4 warning
"C4310: cast truncates constant value";
no functional changes.

Fixes: 354df7eadf66 ("net/sfc/base: import bootrom configuration")
Cc: stable@dpdk.org
Signed-off-by: Andrew Lee <alee@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
drivers/net/sfc/base/efx_bootcfg.c

index c47d16b..660d000 100644 (file)
@@ -356,7 +356,7 @@ efx_bootcfg_read(
        rc = efx_bootcfg_verify(enp, (caddr_t)payload, sector_length,
            &used_bytes);
        if (rc != 0 || used_bytes == 0) {
-               payload[0] = (uint8_t)~DHCP_END;
+               payload[0] = (uint8_t)(~DHCP_END & 0xff);
                payload[1] = DHCP_END;
                used_bytes = 2;
        }