From: Andrew Lee <a...@solarflare.com>

Fix level 4 warning
"C4310: cast truncates constant value";
no functional changes.

Fixes: 354df7eadf66 ("net/sfc/base: import bootrom configuration")
Cc: sta...@dpdk.org

Signed-off-by: Andrew Lee <a...@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybche...@solarflare.com>
---
 drivers/net/sfc/base/efx_bootcfg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/sfc/base/efx_bootcfg.c 
b/drivers/net/sfc/base/efx_bootcfg.c
index c47d16b..660d000 100644
--- a/drivers/net/sfc/base/efx_bootcfg.c
+++ b/drivers/net/sfc/base/efx_bootcfg.c
@@ -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;
        }
-- 
2.7.4

Reply via email to