提交 fd6ebb6f 编写于 作者: K Karsten Graul 提交者: David S. Miller

net/smc: use an array to check fields in system EID

The check for old hardware versions that did not have SMCDv2 support was
using suspicious pointer magic. Address the fields using an array.
Signed-off-by: NKarsten Graul <kgraul@linux.ibm.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 839d696f
无相关合并请求
......@@ -335,7 +335,7 @@ int smcd_register_dev(struct smcd_dev *smcd)
u8 *system_eid = NULL;
smc_ism_get_system_eid(smcd, &system_eid);
if ((*system_eid) + 24 != '0' || (*system_eid) + 28 != '0')
if (system_eid[24] != '0' || system_eid[28] != '0')
smc_ism_v2_capable = true;
}
/* sort list: devices without pnetid before devices with pnetid */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部