[U-Boot] [PATCH v4 01/19] sandbox: Add architecture header files

Simon Glass sjg at chromium.org
Fri Oct 7 22:07:51 CEST 2011


Hi Wolfg

On Thu, Oct 6, 2011 at 2:27 PM, Simon Glass <sjg at chromium.org> wrote:

> Hi Wolfgang,
>
> On Thu, Oct 6, 2011 at 2:11 PM, Wolfgang Denk <wd at denx.de> wrote:
>
>> Dear Simon Glass,
>>
>> In message <1317706010-17151-2-git-send-email-sjg at chromium.org> you
>> wrote:
>> > This adds required header files for the sandbox architecture, and a
>> basic
>> > description of what sandbox is (README.sandbox).
>> >
>> > Signed-off-by: Simon Glass <sjg at chromium.org>
>> > ---
>> > Changes in v2:
>> > - Removed unneeded clock.h
>> > - Moved gpio.h to asm-generic, removed GPIO_COUNT
>> > - Removed kernel cruft from posix_types.h
>> > - Removed dummy field from struct pt_regs
>> > - Remove contents of string.h; instead include linux/string.h
>> > - Remove unneeded functions in u-boot-sandbox.h
>> > - Remove contents of unaligned.h; instead include
>> asm-generic/unaligned.h
>> >
>> > Changes in v4:
>> > - Remove mon_len from global data
>> > - Fix up arm header file incorrectly removed
>> > - Added README note that standalone/API support is not available
>> >
>> >  arch/sandbox/include/asm/bitops.h         |  162
>> +++++++++++++++++++++++++++++
>> >  arch/sandbox/include/asm/byteorder.h      |   40 +++++++
>> >  arch/sandbox/include/asm/config.h         |   26 +++++
>> >  arch/sandbox/include/asm/global_data.h    |   67 ++++++++++++
>> >  arch/sandbox/include/asm/io.h             |   41 +++++++
>> >  arch/sandbox/include/asm/posix_types.h    |   57 ++++++++++
>> >  arch/sandbox/include/asm/ptrace.h         |   38 +++++++
>> >  arch/sandbox/include/asm/string.h         |   23 ++++
>> >  arch/sandbox/include/asm/system.h         |   36 +++++++
>> >  arch/sandbox/include/asm/types.h          |   72 +++++++++++++
>> >  arch/sandbox/include/asm/u-boot-sandbox.h |   38 +++++++
>> >  arch/sandbox/include/asm/u-boot.h         |   61 +++++++++++
>> >  arch/sandbox/include/asm/unaligned.h      |   23 ++++
>> >  doc/README.sandbox                        |   49 +++++++++
>> >  include/asm-generic/gpio.h                |   25 +++++
>> >  include/common.h                          |    3 +
>> >  16 files changed, 761 insertions(+), 0 deletions(-)
>> >  create mode 100644 arch/sandbox/include/asm/bitops.h
>> >  create mode 100644 arch/sandbox/include/asm/byteorder.h
>> >  create mode 100644 arch/sandbox/include/asm/config.h
>> >  create mode 100644 arch/sandbox/include/asm/global_data.h
>> >  create mode 100644 arch/sandbox/include/asm/io.h
>> >  create mode 100644 arch/sandbox/include/asm/posix_types.h
>> >  create mode 100644 arch/sandbox/include/asm/ptrace.h
>> >  create mode 100644 arch/sandbox/include/asm/string.h
>> >  create mode 100644 arch/sandbox/include/asm/system.h
>> >  create mode 100644 arch/sandbox/include/asm/types.h
>> >  create mode 100644 arch/sandbox/include/asm/u-boot-sandbox.h
>> >  create mode 100644 arch/sandbox/include/asm/u-boot.h
>> >  create mode 100644 arch/sandbox/include/asm/unaligned.h
>> >  create mode 100644 doc/README.sandbox
>> >  create mode 100644 include/asm-generic/gpio.h
>>
>> Checkpatch says:
>>
>> total: 0 errors, 44 warnings, 767 lines checked
>>
>
> Yes there are a lot of warnings. Most of them seemed to be Linux-specific
> to me (e.g. use linux/io.h instead of asm/io.h, or not adding new typedefs).
> Should I post a list of them and why I think they are not relevant?
>
>
To follow up, here are the warnings I see, with my explanation below each
warning / group:

clean-patch.py -n
Cleaned 19 patches
0 errors, 44 warnings for 0001-sandbox-Add-architecture-header-files.patch:
warning: arch/sandbox/include/asm/bitops.h,30: Use of volatile is usually
wrong: see Documentation/volatile-considered-harmful.txt
warning: arch/sandbox/include/asm/bitops.h,32: Use of volatile is usually
wrong: see Documentation/volatile-considered-harmful.txt
warning: arch/sandbox/include/asm/bitops.h,34: Use of volatile is usually
wrong: see Documentation/volatile-considered-harmful.txt
warning: arch/sandbox/include/asm/bitops.h,36: Use of volatile is usually
wrong: see Documentation/volatile-considered-harmful.txt
warning: arch/sandbox/include/asm/bitops.h,44: Use of volatile is usually
wrong: see Documentation/volatile-considered-harmful.txt
warning: arch/sandbox/include/asm/bitops.h,54: Use of volatile is usually
wrong: see Documentation/volatile-considered-harmful.txt
warning: arch/sandbox/include/asm/bitops.h,66: Use of volatile is usually
wrong: see Documentation/volatile-considered-harmful.txt
warning: arch/sandbox/include/asm/bitops.h,76: Use of volatile is usually
wrong: see Documentation/volatile-considered-harmful.txt
warning: arch/sandbox/include/asm/bitops.h,88: Use of volatile is usually
wrong: see Documentation/volatile-considered-harmful.txt
warning: arch/sandbox/include/asm/bitops.h,90: Use of volatile is usually
wrong: see Documentation/volatile-considered-harmful.txt

These are the bitops and seem to have volatile in all the other archs also.

warning: arch/sandbox/include/asm/global_data.h,38: do not add new typedefs

This is the typedef for gd_t which I think is needed.

warning: arch/sandbox/include/asm/global_data.h,64: storage class should be
at the beginning of the declaration

This line is:

#define XTRN_DECLARE_GLOBAL_DATA_PTR    extern

I think I can safely remove it, so will do so.

warning: arch/sandbox/include/asm/posix_types.h,22: do not add new typedefs

These are things like

typedef unsigned short __kernel_dev_t;

I believe they are needed.

warning: arch/sandbox/include/asm/posix_types.h,23: do not add new typedefs
warning: arch/sandbox/include/asm/posix_types.h,24: do not add new typedefs
warning: arch/sandbox/include/asm/posix_types.h,25: do not add new typedefs
warning: arch/sandbox/include/asm/posix_types.h,26: do not add new typedefs
warning: arch/sandbox/include/asm/posix_types.h,27: do not add new typedefs
warning: arch/sandbox/include/asm/posix_types.h,28: do not add new typedefs
warning: arch/sandbox/include/asm/posix_types.h,29: do not add new typedefs
warning: arch/sandbox/include/asm/posix_types.h,30: do not add new typedefs
warning: arch/sandbox/include/asm/posix_types.h,32: do not add new typedefs
warning: arch/sandbox/include/asm/posix_types.h,33: do not add new typedefs
warning: arch/sandbox/include/asm/posix_types.h,34: do not add new typedefs
warning: arch/sandbox/include/asm/posix_types.h,36: do not add new typedefs
warning: arch/sandbox/include/asm/posix_types.h,37: do not add new typedefs
warning: arch/sandbox/include/asm/posix_types.h,38: do not add new typedefs
warning: arch/sandbox/include/asm/posix_types.h,40: do not add new typedefs
warning: arch/sandbox/include/asm/posix_types.h,41: do not add new typedefs
warning: arch/sandbox/include/asm/posix_types.h,42: do not add new typedefs
warning: arch/sandbox/include/asm/posix_types.h,43: do not add new typedefs
warning: arch/sandbox/include/asm/posix_types.h,44: do not add new typedefs
warning: arch/sandbox/include/asm/posix_types.h,45: do not add new typedefs
warning: arch/sandbox/include/asm/posix_types.h,46: do not add new typedefs
warning: arch/sandbox/include/asm/posix_types.h,47: do not add new typedefs
warning: arch/sandbox/include/asm/posix_types.h,48: do not add new typedefs
warning: arch/sandbox/include/asm/posix_types.h,50: do not add new typedefs
warning: arch/sandbox/include/asm/posix_types.h,51: do not add new typedefs
warning: arch/sandbox/include/asm/posix_types.h,54: do not add new typedefs

warning: arch/sandbox/include/asm/types.h,26: do not add new typedefs
warning: arch/sandbox/include/asm/types.h,66: do not add new typedefs
warning: arch/sandbox/include/asm/types.h,67: do not add new typedefs
warning: arch/sandbox/include/asm/types.h,68: do not add new typedefs
warning: arch/sandbox/include/asm/u-boot.h,39: do not add new typedefs

These are similar, and common with other architectures, so I think they are
needed.


checkpatch.pl found 0 error(s), 44 warning(s)


Regards,
Simon


>> Please clean up and resubmit.  Thanks.
>>
>> 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
>> Unix: Some say the learning curve is steep,  but  you  only  have  to
>> climb it once.                                      - Karl Lehenbauer
>>
>
>


More information about the U-Boot mailing list