1. 25 8月, 2008 2 次提交
    • D
      dtc: Enable and fix -Wcast-qual warnings · c6683026
      David Gibson 提交于
      Enabling -Wcast-qual warnings in dtc shows up a number of places where
      we are incorrectly discarding a const qualification.  There are also
      some places where we are intentionally discarding the 'const', and we
      need an ugly cast through uintptr_t to suppress the warning.  However,
      most of these are pretty well isolated with the *_w() functions.  So
      in the interests of maximum safety with const qualifications, this
      patch enables the warnings and fixes the existing complaints.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Acked-by: NGerald Van Baren <vanbaren@cideas.com>
      c6683026
    • D
      dtc: Enable and fix -Wpointer-arith warnings · ef4e8ce1
      David Gibson 提交于
      This patch turns on the -Wpointer-arith option in the dtc Makefile,
      and fixes the resulting warnings due to using (void *) in pointer
      arithmetic.  While convenient, pointer arithmetic on void * is not
      portable, so it's better that we avoid it, particularly in libfdt.
      
      Also add necessary definition of uintptr_t needed by David Gibson's
      changeset "dtc: Enable and fix -Wpointer-arith warnings" (the definition
      comes from stdint.h, which u-boot doesn't have). -- gvb
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NGerald Van Baren <vanbaren@cideas.com>
      ef4e8ce1
  2. 10 6月, 2008 1 次提交
    • D
      libfdt: Several cleanups to parameter checking · 2f08bfa9
      David Gibson 提交于
      This patch makes a couple of small cleanups to parameter checking of
      libfdt functions.
      
      	- In several functions which take a node offset, we use an
      idiom involving fdt_next_tag() first to check that we have indeed been
      given a node offset.  This patch adds a helper function
      _fdt_check_node_offset() to encapsulate this usage of fdt_next_tag().
      
      	- In fdt_rw.c in several places we have the expanded version
      of the RW_CHECK_HEADER() macro for no particular reason.  This patch
      replaces those instances with an invocation of the macro; that's what
      it's for.
      
      	- In fdt_sw.c we rename the check_header_sw() function to
      sw_check_header() to match the analgous function in fdt_rw.c, and we
      provide an SW_CHECK_HEADER() wrapper macro as RW_CHECK_HEADER()
      functions in fdt_rw.c
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      2f08bfa9
  3. 19 3月, 2008 1 次提交
    • D
      libfdt: Trivial cleanup for CHECK_HEADER) · d0ccb9b1
      David Gibson 提交于
      Currently the CHECK_HEADER() macro is defined local to fdt_ro.c.
      However, there are a handful of functions (fdt_move, rw_check_header,
      fdt_open_into) from other files which could also use it (currently
      they open-code something more-or-less identical).  Therefore, this
      patch moves CHECK_HEADER() to libfdt_internal.h and uses it in those
      places.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      d0ccb9b1
  4. 22 11月, 2007 1 次提交
  5. 01 4月, 2007 1 次提交
    • G
      libfdt: Enhanced and published fdt_next_tag() · 3af0d587
      Gerald Van Baren 提交于
      Enhanced the formerly private function _fdt_next_tag() to allow stepping
        through the tree, used to produce a human-readable dump, and made
        it part of the published interface.
      Also added some comments.
      3af0d587
  6. 31 3月, 2007 1 次提交