[U-Boot] [PATCH v6 01/13] nds32: add header files support for nds32

Wolfgang Denk wd at denx.de
Thu Mar 24 14:26:49 CET 2011


Dear "Macpaul Lin",

In message <1300969687-2428-1-git-send-email-macpaul at andestech.com> you wrote:
> Add generic header files support for nds32 architecture.
> Cache, ptregs, data type and other definitions are included.
> 
> Signed-off-by: Macpaul Lin <macpaul at andestech.com>

It appears you did not bother to run your patches through checkpatch.
I see this:

[PATCH v6 01/13] nds32: add header files support for nds32
total: 304 errors, 135 warnings, 1320 lines checked
[PATCH v6 02/13] nds32: add NDS32 support into common header file
        OK, 10 lines checked
[PATCH v6 03/13] nds32: config.mk of NDS32 architecture
        OK, 34 lines checked
[PATCH v6 04/13] nds32/core N1213: NDS32 N12 core family N1213
total: 5 errors, 42 warnings, 569 lines checked
[PATCH v6 05/13] nds32/ag101: dev offset header of SoC ag101
total: 13 errors, 9 warnings, 88 lines checked
[PATCH v6 06/13] nds32/ag101: lowlevel_init.S of ag101
        OK, 160 lines checked
[PATCH v6 07/13] nds32/ag101: cpu and init funcs of SoC ag101
total: 20 errors, 28 warnings, 520 lines checked
[PATCH v6 08/13] nds32/lib: add generic funcs in NDS32 lib
total: 29 errors, 60 warnings, 775 lines checked
[PATCH v6 09/13] nds32: standalone support
total: 4 errors, 1 warnings, 114 lines checked
[PATCH v6 10/13] nds32: common bdinfo, bootm, image support
total: 3 errors, 8 warnings, 74 lines checked
[PATCH v6 11/13] nds32/ag101/adp-ag101: add config adp-ag101.h
total: 6 errors, 17 warnings, 382 lines checked
[PATCH v6 12/13] nds32/ag101/adp-ag101: add board adp-ag101 support
total: 1 errors, 0 warnings, 187 lines checked
[PATCH v6 13/13] nds32/ag101/adp-ag101: add board adp-ag101 into
boards.cfg
total: 1 errors, 0 warnings, 13 lines checked

OK, there are a few false positives, but there is also a ton of valid
complaints.

...
> +static inline void __set_bit(int nr, volatile void *addr)
> +{
> +	((unsigned char *) addr)[nr >> 3] |= (1U << (nr & 7));
> +}
> +
> +extern void clear_bit(int nr, volatile void * addr);
> +
> +static inline void __clear_bit(int nr, volatile void *addr)
> +{
> +	((unsigned char *) addr)[nr >> 3] &= ~(1U << (nr & 7));
> +}

For example, all these macros must use I/O accessors instead of
volatile pointer accesses.

This needs some cleanup.

[Review stops here. Please fix the checkpatch issues first.]

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
If there was anything that depressed him more than his own  cynicism,
it was that quite often it still wasn't as cynical as real life.
                                 - Terry Pratchett, _Guards! Guards!_


More information about the U-Boot mailing list