[U-Boot] [PATCH] inka4x0: Add hardware diagnosis functions for inka4x0

Scott Wood scottwood at freescale.com
Wed Mar 25 00:08:35 CET 2009


Wolfgang Denk wrote:
>> +static int do_inkadiag_serial(cmd_tbl_t *cmdtp, int flag, int argc,
>> +			      char *argv[]) {
>> +	if (argc < 5) {
>> +		cmd_usage(cmdtp);
>> +		return 1;
>> +	}
>> +
>> +	argc--;
>> +	argv++;
>> +
>> +	unsigned int num = simple_strtol(argv[0], NULL, 0);
> 
> Please NEVER declare variables right in the middle of the code!!
> 
> Did this actually pass a compile test?

Probably -- it's been legal C for about a decade.

Style is another matter, but the compiler's not going to enforce that. :-)

-Scott


More information about the U-Boot mailing list