From: Andrew Lee <[email protected]>
Fix level 4 warning
"C4310: cast truncates constant value";
no functional changes.
Fixes: 354df7eadf66 ("net/sfc/base: import bootrom configuration")
Cc: [email protected]
Signed-off-by: Andrew Lee <[email protected]>
Signed-off-by: Andrew Rybchenko <[email protected]>
---
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