1. 29 1月, 2016 1 次提交
  2. 07 9月, 2015 1 次提交
    • M
      arm: Use g_new() & friends where that makes obvious sense · b45c03f5
      Markus Armbruster 提交于
      g_new(T, n) is neater than g_malloc(sizeof(T) * n).  It's also safer,
      for two reasons.  One, it catches multiplication overflowing size_t.
      Two, it returns T * rather than void *, which lets the compiler catch
      more type errors.
      
      This commit only touches allocations with size arguments of the form
      sizeof(T).
      
      Coccinelle semantic patch:
      
          @@
          type T;
          @@
          -g_malloc(sizeof(T))
          +g_new(T, 1)
          @@
          type T;
          @@
          -g_try_malloc(sizeof(T))
          +g_try_new(T, 1)
          @@
          type T;
          @@
          -g_malloc0(sizeof(T))
          +g_new0(T, 1)
          @@
          type T;
          @@
          -g_try_malloc0(sizeof(T))
          +g_try_new0(T, 1)
          @@
          type T;
          expression n;
          @@
          -g_malloc(sizeof(T) * (n))
          +g_new(T, n)
          @@
          type T;
          expression n;
          @@
          -g_try_malloc(sizeof(T) * (n))
          +g_try_new(T, n)
          @@
          type T;
          expression n;
          @@
          -g_malloc0(sizeof(T) * (n))
          +g_new0(T, n)
          @@
          type T;
          expression n;
          @@
          -g_try_malloc0(sizeof(T) * (n))
          +g_try_new0(T, n)
          @@
          type T;
          expression p, n;
          @@
          -g_realloc(p, sizeof(T) * (n))
          +g_renew(T, p, n)
          @@
          type T;
          expression p, n;
          @@
          -g_try_realloc(p, sizeof(T) * (n))
          +g_try_renew(T, p, n)
          @@
          type T;
          expression n;
          @@
          -(T *)g_new(T, n)
          +g_new(T, n)
          @@
          type T;
          expression n;
          @@
          -(T *)g_new0(T, n)
          +g_new0(T, n)
          @@
          type T;
          expression p, n;
          @@
          -(T *)g_renew(T, p, n)
          +g_renew(T, p, n)
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Message-id: 1440524394-15640-1-git-send-email-armbru@redhat.com
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      b45c03f5
  3. 19 3月, 2015 1 次提交
    • S
      omap: Fix warnings from Sparse · 77a8257e
      Stefan Weil 提交于
      Sparse report:
      
      arm/omap1.c:1015:9: warning: returning void-valued expression
      arm/omap1.c:1084:9: warning: returning void-valued expression
      arm/omap1.c:1178:9: warning: returning void-valued expression
      arm/omap1.c:1287:9: warning: returning void-valued expression
      arm/omap1.c:1382:9: warning: returning void-valued expression
      arm/omap1.c:1650:9: warning: returning void-valued expression
      arm/omap1.c:1778:9: warning: returning void-valued expression
      arm/omap1.c:1985:9: warning: returning void-valued expression
      arm/omap1.c:210:9: warning: returning void-valued expression
      arm/omap1.c:2213:9: warning: returning void-valued expression
      arm/omap1.c:2352:9: warning: returning void-valued expression
      arm/omap1.c:2447:9: warning: returning void-valued expression
      arm/omap1.c:2640:9: warning: returning void-valued expression
      arm/omap1.c:317:9: warning: returning void-valued expression
      arm/omap1.c:3413:13: warning: returning void-valued expression
      arm/omap1.c:3414:13: warning: returning void-valued expression
      arm/omap1.c:3415:14: warning: returning void-valued expression
      arm/omap1.c:3589:9: warning: returning void-valued expression
      arm/omap1.c:443:9: warning: returning void-valued expression
      arm/omap1.c:588:9: warning: returning void-valued expression
      arm/omap1.c:860:9: warning: returning void-valued expression
      arm/omap2.c:1362:9: warning: returning void-valued expression
      arm/omap2.c:450:9: warning: returning void-valued expression
      arm/omap2.c:695:9: warning: returning void-valued expression
      arm/omap2.c:760:9: warning: returning void-valued expression
      hw/char/omap_uart.c:115:9: warning: returning void-valued expression
      hw/display/omap_dss.c:1019:9: warning: returning void-valued expression
      hw/display/omap_dss.c:215:9: warning: returning void-valued expression
      hw/display/omap_dss.c:380:9: warning: returning void-valued expression
      hw/display/omap_dss.c:739:9: warning: returning void-valued expression
      hw/display/omap_dss.c:931:9: warning: returning void-valued expression
      hw/dma/omap_dma.c:139:5: warning: returning void-valued expression
      hw/dma/omap_dma.c:1505:9: warning: returning void-valued expression
      hw/dma/omap_dma.c:1860:9: warning: returning void-valued expression
      hw/gpio/omap_gpio.c:116:9: warning: returning void-valued expression
      hw/misc/omap_gpmc.c:627:9: warning: returning void-valued expression
      hw/misc/omap_l4.c:85:9: warning: returning void-valued expression
      hw/misc/omap_sdrc.c:95:9: warning: returning void-valued expression
      hw/misc/omap_tap.c:98:9: warning: returning void-valued expression
      hw/sd/omap_mmc.c:409:9: warning: returning void-valued expression
      hw/ssi/omap_spi.c:229:9: warning: returning void-valued expression
      hw/timer/omap_gptimer.c:447:9: warning: returning void-valued expression
      
      Cc: Peter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NStefan Weil <sw@weilnetz.de>
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      77a8257e
  4. 24 10月, 2014 1 次提交
  5. 18 8月, 2014 1 次提交
  6. 13 5月, 2014 1 次提交
  7. 04 7月, 2013 1 次提交
  8. 09 4月, 2013 2 次提交
  9. 01 3月, 2013 1 次提交
    • P
      hw: include hw header files with full paths · 83c9f4ca
      Paolo Bonzini 提交于
      Done with this script:
      
      cd hw
      for i in `find . -name '*.h' | sed 's/^..//'`; do
        echo '\,^#.*include.*["<]'$i'[">], s,'$i',hw/&,'
      done | sed -i -f - `find . -type f`
      
      This is so that paths remain valid as files are moved.
      
      Instead, files in hw/dataplane are referenced with the relative path.
      We know they are not going to move to include/, and they are the only
      include files that are in subdirectories _and_ move.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      83c9f4ca
  10. 19 12月, 2012 1 次提交
  11. 23 10月, 2012 1 次提交
    • A
      Rename target_phys_addr_t to hwaddr · a8170e5e
      Avi Kivity 提交于
      target_phys_addr_t is unwieldly, violates the C standard (_t suffixes are
      reserved) and its purpose doesn't match the name (most target_phys_addr_t
      addresses are not target specific).  Replace it with a finger-friendly,
      standards conformant hwaddr.
      
      Outstanding patchsets can be fixed up with the command
      
        git rebase -i --exec 'find -name "*.[ch]"
                              | xargs s/target_phys_addr_t/hwaddr/g' origin
      Signed-off-by: NAvi Kivity <avi@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      a8170e5e
  12. 04 1月, 2012 1 次提交
  13. 10 11月, 2011 1 次提交
  14. 23 9月, 2011 2 次提交
  15. 29 8月, 2011 13 次提交
  16. 24 8月, 2011 1 次提交
  17. 22 8月, 2011 1 次提交
  18. 21 8月, 2011 1 次提交
  19. 11 12月, 2010 1 次提交
    • A
      Add endianness as io mem parameter · 2507c12a
      Alexander Graf 提交于
      As stated before, devices can be little, big or native endian. The
      target endianness is not of their concern, so we need to push things
      down a level.
      
      This patch adds a parameter to cpu_register_io_memory that allows a
      device to choose its endianness. For now, all devices simply choose
      native endian, because that's the same behavior as before.
      Signed-off-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      2507c12a
  20. 01 7月, 2010 1 次提交