public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 00/32] Initial sparse fix series
@ 2012-10-17  0:28 Kim Phillips
  2012-10-17  0:28 ` [U-Boot] [PATCH 01/32] include/linux/byteorder: import latest endian definitions from linux Kim Phillips
                   ` (35 more replies)
  0 siblings, 36 replies; 117+ messages in thread
From: Kim Phillips @ 2012-10-17  0:28 UTC (permalink / raw)
  To: u-boot

This 32-patch series only begins to address making u-boot source more
'sparseable,' or sparse-clean, ultimately to catch type, address space,
and endianness mismatches and generally improve code quality. E.g., in this
initial dose whose main purpose is to reduce the output volume to workable
levels, a couple of endianness bugs are found and fixed in
of_bus_default_translate() and fdt_get_base_address().  See [PATCH 14/32]
common/fdt_support.c: sparse fixes.

Patch 1 adds endianness attributes to byteorder.h helpers, e.g.,
cpu_to_be32().  This is required for correct operation and
prevents sparse from emitting false-positives.

Patches 2-6 fix issues where u-boot had imported linux header code
and the importer simply force-#defined sparse-specific attributes to
nothing, to allow u-boot to build.

Patches 7-10 are general sparse fixes to common header areas.

Patch 11 is too, which also changes the long-standing u-boot image header
types to __be32, as per u-boot image definition.

Patches 12-14 address further misc. sparse issues in common/.

Patches 15-16 do the same for the net subsystem.

Patches 17-18 do the same for lib/.

Patch 19 for include/fdt.h.

Patches 20-23 for Power Arch's mpc8xxx, 83xx, and 85xx subsystems.

Last but not least, patches 24-32 attempt to clean up various drivers.

Note that there are two libfdt dependencies:

1. commits aa28b89b "libfdt: Add helpers for 64-bit integer properties" and
commit 786ed04 "libfdt: Add support for appending the values to a existing
property", currently sitting in u-boot-fdt/next.  This series is based
on today's mainline u-boot/next with those two patches pre-applied.
    
2. potential upstream dtc change dependencies, due to having to attribute base
device tree header types to __be32 in include/libfdt.  See patch 19/32
"include/fdt.h: sparse fixes".  It is unknown whether such changes would
be welcome to dtc (but there's a way to find out :).

For authors of new patches not willing to sift through the still quite
large sparse output for their board/platform, though interested in what
sparse has to say about their new code, it is recommended to build
with make C=1 after changes such that sparse output will only include
newly built code.

For your convenience, I've pushed the series onto the u-boot-mpc83xx
tree, 'sparsefixes' branch [1].  The branch includes libfdt dependency
#1 mentioned above.

Build-tested in both endians :).  Please help test.

Thanks,

Kim

[1] see http://git.denx.de/u-boot.git/?p=u-boot/u-boot-mpc83xx.git;a=shortlog;h=refs/heads/sparsefixes

Kim Phillips (32):
  include/linux/byteorder: import latest endian definitions from linux
  include/linux/compat.h: fix warning: preprocessor token __iomem
    redefined
  include/linux/unaligned/generic.h: fix warning: preprocessor token
    __force redefined
  include/linux/stddef.h: avoid 'warning: preprocessor token offsetof
    redefined'
  arch/powerpc/include/asm/io.h: fix warning: preprocessor token
    __iomem redefined
  arch/powerpc/lib/bootm.c: fix noinline attribute
  arch/powerpc/lib/extable.c: sparse fix
  arch/powerpc/lib/board.c,*traps.c: sparse fixes
  include/common.h: sparse fix
  include/command.h: sparse fix
  include/image.h: sparse fixes
  common/cmd_*.c: sparse fixes
  common/misc: sparse fixes
  common/fdt_support.c: sparse fixes
  net/: sparse fixes
  drivers/net/: sparse fixes
  lib/zlib: sparse fixes
  lib/vsprintf.c: sparse fixes
  include/fdt.h: sparse fixes
  arch/powerpc/cpu/mpc8xxx/: sparse fixes
  arch/powerpc/cpu/mpc85xx/fdt.c: sparse fixes
  powerpc/mpc85xx: sparse fixes
  powerpc/mpc83xx: sparse fixes
  drivers/block/: sparse fixes
  drivers/gpio/mpc83xx_gpio.c: sparse fixes
  drivers/input/input.c: sparse fix
  drivers/i2c/fsl_i2c.c: sparse fix
  drivers/mmc/mmc.c: sparse fixes
  drivers/mmc/fsl_esdhc.c: sparse fixes
  drivers/mtd/cfi_flash.c: sparse fixes
  drivers/mtd/nand: sparse fixes
  drivers/serial/serial_ns16550.c: sparse fixes

 arch/powerpc/cpu/74xx_7xx/traps.c                  |   6 +-
 arch/powerpc/cpu/mpc512x/traps.c                   |   6 +-
 arch/powerpc/cpu/mpc5xx/traps.c                    |   6 +-
 arch/powerpc/cpu/mpc5xxx/traps.c                   |   6 +-
 arch/powerpc/cpu/mpc8220/traps.c                   |   6 +-
 arch/powerpc/cpu/mpc824x/traps.c                   |   6 +-
 arch/powerpc/cpu/mpc8260/traps.c                   |   6 +-
 arch/powerpc/cpu/mpc83xx/fdt.c                     |   4 +-
 arch/powerpc/cpu/mpc83xx/speed.c                   |   4 +-
 arch/powerpc/cpu/mpc83xx/traps.c                   |   6 +-
 arch/powerpc/cpu/mpc85xx/cpu_init.c                |   2 +-
 arch/powerpc/cpu/mpc85xx/fdt.c                     |  57 +++++----
 arch/powerpc/cpu/mpc85xx/fsl_corenet_serdes.c      |   2 +-
 arch/powerpc/cpu/mpc85xx/traps.c                   |   6 +-
 arch/powerpc/cpu/mpc86xx/traps.c                   |   6 +-
 arch/powerpc/cpu/mpc8xx/traps.c                    |   6 +-
 arch/powerpc/cpu/mpc8xxx/cpu.c                     |   8 +-
 arch/powerpc/cpu/mpc8xxx/ddr/ctrl_regs.c           |   2 +-
 .../cpu/mpc8xxx/ddr/lc_common_dimm_params.c        |   4 +-
 arch/powerpc/cpu/mpc8xxx/fdt.c                     |   3 +-
 arch/powerpc/cpu/mpc8xxx/fsl_lbc.c                 |   2 +-
 arch/powerpc/cpu/ppc4xx/traps.c                    |   6 +-
 arch/powerpc/include/asm/io.h                      |   1 -
 arch/powerpc/lib/board.c                           |  12 +-
 arch/powerpc/lib/bootm.c                           |   2 +-
 arch/powerpc/lib/extable.c                         |   2 +-
 board/freescale/common/ngpixis.c                   |  10 +-
 board/freescale/mpc8313erdb/mpc8313erdb.c          |  24 ++--
 board/freescale/mpc8568mds/bcsr.c                  |   8 +-
 board/freescale/mpc8569mds/bcsr.c                  |   8 +-
 common/cmd_boot.c                                  |   5 +-
 common/cmd_bootm.c                                 |  27 +++--
 common/cmd_console.c                               |   2 +-
 common/cmd_date.c                                  |   2 +-
 common/cmd_echo.c                                  |   2 +-
 common/cmd_exit.c                                  |   2 +-
 common/cmd_fat.c                                   |   5 +-
 common/cmd_fdt.c                                   |  19 +--
 common/cmd_flash.c                                 |   6 +-
 common/cmd_help.c                                  |   2 +-
 common/cmd_i2c.c                                   |  18 +--
 common/cmd_irq.c                                   |   2 +-
 common/cmd_itest.c                                 |   4 +-
 common/cmd_load.c                                  |  44 +++----
 common/cmd_mdio.c                                  |  20 +--
 common/cmd_mem.c                                   |  25 ++--
 common/cmd_misc.c                                  |   2 +-
 common/cmd_mmc.c                                   |   6 +-
 common/cmd_mp.c                                    |  20 ++-
 common/cmd_mtdparts.c                              |  28 +++--
 common/cmd_nand.c                                  |  17 +--
 common/cmd_net.c                                   |   8 +-
 common/cmd_nvedit.c                                |  23 ++--
 common/cmd_pci.c                                   |  15 ++-
 common/cmd_reginfo.c                               |   3 +-
 common/cmd_sata.c                                  |   4 +-
 common/cmd_setexpr.c                               |   2 +-
 common/cmd_source.c                                |  11 +-
 common/cmd_test.c                                  |   6 +-
 common/cmd_usb.c                                   |  30 ++---
 common/cmd_version.c                               |   2 +-
 common/cmd_ximg.c                                  |  11 +-
 common/command.c                                   |   9 +-
 common/console.c                                   |   2 +-
 common/dlmalloc.c                                  |  36 +++---
 common/fdt_support.c                               |  78 ++++++------
 common/hush.c                                      |  30 ++---
 common/image.c                                     |   8 +-
 common/main.c                                      |   6 +-
 common/update.c                                    |   1 +
 common/usb_storage.c                               |  20 +--
 common/xyzModem.c                                  |   6 +-
 drivers/block/fsl_sata.c                           |  79 ++----------
 drivers/block/fsl_sata.h                           |  12 +-
 drivers/block/sata_sil.c                           |  13 +-
 drivers/gpio/mpc83xx_gpio.c                        |   4 +-
 drivers/i2c/fsl_i2c.c                              |   2 +-
 drivers/input/input.c                              |   2 +-
 drivers/mmc/fsl_esdhc.c                            |   4 +-
 drivers/mmc/mmc.c                                  |  37 +++---
 drivers/mtd/cfi_flash.c                            |  20 +--
 drivers/mtd/nand/nand_base.c                       |   9 +-
 drivers/mtd/nand/nand_ecc.c                        |   1 +
 drivers/net/fm/eth.c                               |   2 +-
 drivers/net/fm/p1023.c                             |   2 +-
 drivers/net/fm/p4080.c                             |   2 +-
 drivers/net/fm/p5020.c                             |   2 +-
 drivers/net/fm/tgec_phy.c                          |  10 +-
 drivers/net/phy/atheros.c                          |   2 +-
 drivers/net/phy/phy.c                              |  19 +--
 drivers/net/phy/vitesse.c                          |   2 +-
 drivers/net/vsc7385.c                              |   1 +
 drivers/qe/qe.h                                    |  34 +++---
 drivers/serial/serial_ns16550.c                    |  12 +-
 include/command.h                                  |   2 +-
 include/common.h                                   |   4 -
 include/fdt.h                                      |  33 ++---
 include/fdt_support.h                              |   4 +-
 include/image.h                                    |  15 +--
 include/libfdt.h                                   |   4 +-
 include/linux/byteorder/big_endian.h               | 135 ++++++++++++++-------
 include/linux/byteorder/little_endian.h            | 133 +++++++++++++-------
 include/linux/byteorder/swab.h                     |   6 +-
 include/linux/compat.h                             |   3 -
 include/linux/stddef.h                             |   2 +
 include/linux/unaligned/generic.h                  |   3 -
 include/net.h                                      |   9 +-
 include/u-boot/zlib.h                              |   2 +-
 lib/libfdt/fdt.c                                   |   2 +-
 lib/libfdt/fdt_ro.c                                |   2 +-
 lib/libfdt/fdt_rw.c                                |   4 +-
 lib/libfdt/fdt_sw.c                                |   4 +-
 lib/libfdt/fdt_wip.c                               |   2 +-
 lib/vsprintf.c                                     |   4 +-
 lib/zlib/adler32.c                                 |   5 +-
 lib/zlib/inffast.c                                 |   5 +-
 lib/zlib/inflate.c                                 |  29 ++---
 lib/zlib/inftrees.c                                |  10 +-
 lib/zlib/zutil.c                                   |  10 +-
 net/arp.c                                          |   6 +-
 net/bootp.c                                        |   6 +-
 net/net.c                                          |   2 +-
 net/ping.h                                         |   3 -
 net/tftp.h                                         |   3 +
 124 files changed, 789 insertions(+), 730 deletions(-)

-- 
1.7.12.3

^ permalink raw reply	[flat|nested] 117+ messages in thread

end of thread, other threads:[~2013-01-06 21:52 UTC | newest]

Thread overview: 117+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-17  0:28 [U-Boot] [PATCH 00/32] Initial sparse fix series Kim Phillips
2012-10-17  0:28 ` [U-Boot] [PATCH 01/32] include/linux/byteorder: import latest endian definitions from linux Kim Phillips
2012-10-25 17:37   ` Tom Rini
2012-10-17  0:28 ` [U-Boot] [PATCH 02/32] include/linux/compat.h: fix warning: preprocessor token __iomem redefined Kim Phillips
2012-10-24 21:31   ` Tom Rini
2012-10-17  0:28 ` [U-Boot] [PATCH 03/32] include/linux/unaligned/generic.h: fix warning: preprocessor token __force redefined Kim Phillips
2012-10-17  0:28 ` [U-Boot] [PATCH 04/32] include/linux/stddef.h: avoid 'warning: preprocessor token offsetof redefined' Kim Phillips
2012-10-17  0:28 ` [U-Boot] [PATCH 05/32] arch/powerpc/include/asm/io.h: fix warning: preprocessor token __iomem redefined Kim Phillips
2012-10-17  0:28 ` [U-Boot] [PATCH 06/32] arch/powerpc/lib/bootm.c: fix noinline attribute Kim Phillips
2012-10-17  0:28 ` [U-Boot] [PATCH 07/32] arch/powerpc/lib/extable.c: sparse fix Kim Phillips
2012-10-17  0:28 ` [U-Boot] [PATCH 08/32] arch/powerpc/lib/board.c, *traps.c: sparse fixes Kim Phillips
2012-10-18 16:55   ` Tom Rini
2012-10-17  0:28 ` [U-Boot] [PATCH 09/32] include/common.h: sparse fix Kim Phillips
2012-10-17  0:28 ` [U-Boot] [PATCH 10/32] include/command.h: " Kim Phillips
2012-10-25 16:35   ` Tom Rini
2012-10-17  0:28 ` [U-Boot] [PATCH 11/32] include/image.h: sparse fixes Kim Phillips
2012-10-17  0:28 ` [U-Boot] [PATCH 12/32] common/cmd_*.c: " Kim Phillips
2012-10-24 23:49   ` Tom Rini
2012-10-17  0:28 ` [U-Boot] [PATCH 13/32] common/misc: " Kim Phillips
2012-10-25 17:32   ` Tom Rini
2012-10-17  0:28 ` [U-Boot] [PATCH 14/32] common/fdt_support.c: " Kim Phillips
2012-10-17  0:28 ` [U-Boot] [PATCH 15/32] net/: " Kim Phillips
2012-10-17  0:28 ` [U-Boot] [PATCH 16/32] drivers/net/: " Kim Phillips
2012-10-17  0:28 ` [U-Boot] [PATCH 17/32] lib/zlib: " Kim Phillips
2012-10-17  0:28 ` [U-Boot] [PATCH 18/32] lib/vsprintf.c: " Kim Phillips
2012-10-17  0:28 ` [U-Boot] [PATCH 19/32] include/fdt.h: " Kim Phillips
2012-10-17  0:28 ` [U-Boot] [PATCH 20/32] arch/powerpc/cpu/mpc8xxx/: " Kim Phillips
2012-10-17  0:28 ` [U-Boot] [PATCH 21/32] arch/powerpc/cpu/mpc85xx/fdt.c: " Kim Phillips
2012-10-17  0:28 ` [U-Boot] [PATCH 22/32] powerpc/mpc85xx: " Kim Phillips
2012-10-17  0:28 ` [U-Boot] [PATCH 23/32] powerpc/mpc83xx: " Kim Phillips
2012-10-17  0:28 ` [U-Boot] [PATCH 24/32] drivers/block/: " Kim Phillips
2012-10-17  0:28 ` [U-Boot] [PATCH 25/32] drivers/gpio/mpc83xx_gpio.c: " Kim Phillips
2012-10-17  0:28 ` [U-Boot] [PATCH 26/32] drivers/input/input.c: sparse fix Kim Phillips
2012-10-17  0:28 ` [U-Boot] [PATCH 27/32] drivers/i2c/fsl_i2c.c: " Kim Phillips
2012-10-17  3:57   ` Heiko Schocher
2012-10-26  3:29   ` [U-Boot] [U-Boot,27/32] " Tom Rini
2012-10-17  0:28 ` [U-Boot] [PATCH 28/32] drivers/mmc/mmc.c: sparse fixes Kim Phillips
2012-10-17  0:28 ` [U-Boot] [PATCH 29/32] drivers/mmc/fsl_esdhc.c: " Kim Phillips
2012-10-17  0:28 ` [U-Boot] [PATCH 30/32] drivers/mtd/cfi_flash.c: " Kim Phillips
2012-10-17  0:28 ` [U-Boot] [PATCH 31/32] drivers/mtd/nand: " Kim Phillips
2012-10-22 19:18   ` Scott Wood
2012-10-17  0:28 ` [U-Boot] [PATCH 32/32] drivers/serial/serial_ns16550.c: " Kim Phillips
2012-10-26  3:30   ` [U-Boot] [U-Boot, " Tom Rini
2012-10-18  0:19 ` [U-Boot] [PATCH 00/32] Initial sparse fix series Jerry Van Baren
2012-10-18 12:11   ` David Gibson
2012-10-18 22:30     ` Kim Phillips
2012-10-19  0:43       ` David Gibson
2012-10-30 21:57         ` [U-Boot] [PATCH] libfdt: introduce fdt type annotation for use by endian checkers Kim Phillips
2012-10-30 22:24           ` Stephen Warren
2012-10-30 22:27             ` Kim Phillips
2012-11-06  7:48           ` David Gibson
2012-11-14  0:34             ` [U-Boot] [PATCH 3/4 v2] dtc/libfdt: introduce fdt types for annotation " Kim Phillips
2012-11-14 14:42               ` Jon Loeliger
2012-11-15  0:59                 ` [U-Boot] [PATCH v2 1/4] dtc/tests: don't include fdt.h prior to libfdt.h Kim Phillips
2012-11-15  0:59                   ` [U-Boot] [PATCH v2 2/4] dtc/fdtdump: include libfdt_env.h prior to fdt.h Kim Phillips
2012-11-15  0:59                   ` [U-Boot] [PATCH v3 3/4] dtc/libfdt: introduce fdt types for annotation by endian checkers Kim Phillips
2012-11-15  4:43                     ` David Gibson
2012-11-15  5:12                       ` Kim Phillips
2012-11-19  2:30                         ` David Gibson
2012-11-28 23:33                           ` [U-Boot] [PATCH v4 " Kim Phillips
2012-12-03  4:05                             ` David Gibson
2013-01-06 21:52                             ` Jon Loeliger
2012-11-15  0:59                   ` [U-Boot] [PATCH v2 4/4] dtc/libfdt: uintXX_t to fdtXX_t conversion Kim Phillips
2012-10-18 16:53 ` [U-Boot] [PATCH 00/32] Initial sparse fix series Tom Rini
2012-10-24 21:21   ` Tom Rini
2012-10-24 22:47     ` Kim Phillips
2012-10-25 17:46 ` Tom Rini
2012-10-25 18:59   ` Kim Phillips
2012-10-25 19:28     ` Tom Rini
2012-10-29 23:34 ` [U-Boot] [PATCH v2 " Kim Phillips
2012-10-29 23:34   ` [U-Boot] [PATCH v2 01/25] include/linux/byteorder: import latest endian definitions from linux Kim Phillips
2012-10-29 23:34   ` [U-Boot] [PATCH v2 02/25] include/linux/compat.h: fix warning: preprocessor token {__iomem, __user} redefined Kim Phillips
2012-10-29 23:34   ` [U-Boot] [PATCH v2 03/25] include/linux/unaligned/generic.h: fix warning: preprocessor token __force redefined Kim Phillips
2012-10-29 23:34   ` [U-Boot] [PATCH v2 04/25] include/linux/stddef.h: avoid 'warning: preprocessor token offsetof redefined' Kim Phillips
2012-10-29 23:34   ` [U-Boot] [PATCH v2 05/25] arch/powerpc/include/asm/io.h: fix warning: preprocessor token __iomem redefined Kim Phillips
2012-10-29 23:34   ` [U-Boot] [PATCH v2 06/25] arch/powerpc/lib/extable.c: sparse fix Kim Phillips
2012-10-29 23:34   ` [U-Boot] [PATCH v2 07/25] arch/powerpc/lib/board.c, *traps.c: sparse fixes Kim Phillips
2012-10-29 23:34   ` [U-Boot] [PATCH v2 08/25] include/image.h: " Kim Phillips
2012-10-29 23:34   ` [U-Boot] [PATCH v2 09/25] common/cmd_*.c: " Kim Phillips
2012-11-08 10:48     ` Wolfgang Denk
2012-11-09  1:04       ` Kim Phillips
2012-10-29 23:34   ` [U-Boot] [PATCH v2 10/25] common/misc: " Kim Phillips
2012-11-05 21:30     ` Henrik Nordström
2012-11-06  1:51       ` [U-Boot] [PATCH] common: fix help command breakage Kim Phillips
2012-11-06  5:44         ` Henrik Nordström
2012-11-07 21:39           ` Simon Glass
2012-11-07 22:23         ` Anatolij Gustschin
2012-11-08 11:02           ` Anatolij Gustschin
2012-11-08 11:23             ` Wolfgang Denk
2012-11-08 10:41         ` Wolfgang Denk
2012-11-08 11:52         ` [U-Boot] [PATCH] common/command.c: revert chanches from commit 199adb60 Anatolij Gustschin
2012-11-08 12:42           ` Anatolij Gustschin
2012-11-10 11:21             ` Albert ARIBAUD
2012-11-10 11:41               ` Anatolij Gustschin
2012-12-14  4:13                 ` Rommel Custodio
2012-12-14  7:51                   ` Anatolij Gustschin
2012-10-29 23:34   ` [U-Boot] [PATCH v2 11/25] net/: sparse fixes Kim Phillips
2012-10-29 23:34   ` [U-Boot] [PATCH v2 12/25] drivers/net/: " Kim Phillips
2012-10-29 23:34   ` [U-Boot] [PATCH v2 13/25] lib/zlib: " Kim Phillips
2012-11-08 11:20     ` Wolfgang Denk
2012-11-09  1:06       ` Kim Phillips
2012-11-21 16:37         ` Tom Rini
2012-10-29 23:34   ` [U-Boot] [PATCH v2 14/25] lib/vsprintf.c: " Kim Phillips
2012-10-29 23:34   ` [U-Boot] [PATCH v2 15/25] arch/powerpc/cpu/mpc8xxx/: " Kim Phillips
2012-10-29 23:34   ` [U-Boot] [PATCH v2 16/25] powerpc/mpc85xx: " Kim Phillips
2012-10-29 23:34   ` [U-Boot] [PATCH v2 17/25] powerpc/mpc83xx: " Kim Phillips
2012-10-29 23:34   ` [U-Boot] [PATCH v2 18/25] drivers/block/: " Kim Phillips
2012-10-29 23:34   ` [U-Boot] [PATCH v2 19/25] drivers/gpio/mpc83xx_gpio.c: " Kim Phillips
2012-10-29 23:34   ` [U-Boot] [PATCH v2 20/25] drivers/input/input.c: sparse fix Kim Phillips
2012-10-31  5:51     ` Simon Glass
2012-10-29 23:34   ` [U-Boot] [PATCH v2 21/25] drivers/mmc/mmc.c: sparse fixes Kim Phillips
2012-10-29 23:34   ` [U-Boot] [PATCH v2 22/25] drivers/mmc/fsl_esdhc.c: " Kim Phillips
2012-10-29 23:34   ` [U-Boot] [PATCH v2 23/25] drivers/mtd/cfi_flash.c: " Kim Phillips
2012-10-29 23:34   ` [U-Boot] [PATCH v2 24/25] drivers/mtd/nand: " Kim Phillips
2012-10-30  0:43     ` Scott Wood
2012-10-29 23:34   ` [U-Boot] [PATCH v2 25/25] drivers/serial/serial_ns16550.c: " Kim Phillips
2012-11-04 18:30   ` [U-Boot] [PATCH v2 00/32] Initial sparse fix series Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox