
21 Jul
2022
21 Jul
'22
2:26 a.m.
On 7/4/22 13:11, Philip Oberfichtner wrote:
[...]
+++ b/board/dhelectronics/common/dh_common.c @@ -0,0 +1,64 @@
[...]
+int dh_get_mac_from_eeprom(unsigned char *enetaddr, const char *alias) +{
- struct udevice *dev;
- int ret, offset;
- offset = fdt_path_offset(gd->fdt_blob, alias);
- if (offset < 0) {
printf("%s: Path offset for %s not found! Error %d\n", __func__, alias, offset);
Use "ret = %d" instead of "Error %d" consistently with the rest of this function.
return offset;
- }
- ret = uclass_get_device_by_of_offset(UCLASS_I2C_EEPROM, offset, &dev);
- if (ret) {
printf("%s: Cannot find EEPROM! ret = %d\n", __func__, ret);
Two spaces between "ret =" and "%d"
[...]