
Dear York Sun,
In message 1313076710-12662-1-git-send-email-yorksun@freescale.com you wrote:
Change the help message to be more helpful. Print argument format. Fix MAX_NUM_PORTS to comply with v1 NXID format. Accept hexadecimal and decimal for port count and index.
...
case 'p': /* MAC table size */
e.mac_count = simple_strtoul(argv[2], NULL, 16);
update_crc(); break;e.mac_count = simple_strtoul(argv[2], NULL, 0);
- case '0' ... '9': /* "mac 0" through "mac 22" */
set_mac_address(simple_strtoul(argv[1], NULL, 10), argv[2]);
- case '0' ... '9': /* "mac 0" through "mac 31" */
set_mac_address(simple_strtoul(argv[1], NULL, 0), argv[2]);
These changes silently change the behaviour of the command. So far, an argument line "24" would be parsed as hex number (i. e. result in decimal value 36); with this change it suddenly becomes devcimal 24, which is quite unexpected.
There are very few exceptions wher eU-Boot uses and expects decimal numbers, and I strongly recommend not to add any new such inconsistencies.
+#ifdef CONFIG_SYS_I2C_EEPROM_NXID
- " - program the MAC address for port n [n=0...30]"
0...30 ? The code above says "mac 0" through "mac 31"? Or is it 0 ... 22 ?
Best regards,
Wolfgang Denk