Commit fd6ebb6f authored by Karsten Graul's avatar Karsten Graul Committed by David S. Miller
Browse files

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: default avatarKarsten Graul <kgraul@linux.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 839d696f
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -335,7 +335,7 @@ int smcd_register_dev(struct smcd_dev *smcd)
		u8 *system_eid = NULL;
		u8 *system_eid = NULL;


		smc_ism_get_system_eid(smcd, &system_eid);
		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;
			smc_ism_v2_capable = true;
	}
	}
	/* sort list: devices without pnetid before devices with pnetid */
	/* sort list: devices without pnetid before devices with pnetid */