1. 29 Jun, 2016 3 commits
    • Arnd Bergmann's avatar
      dsa: b53: avoid 'maybe-uninitialized' warning · 5eca2914
      Arnd Bergmann authored
      In some configurations, gcc produces a warning for correct code
      in this driver:
      
      drivers/net/dsa/b53/b53_mmap.c: In function 'b53_mmap_read64':
      drivers/net/dsa/b53/b53_mmap.c:107:10: error: 'hi' may be used uninitialized in this function [-Werror=maybe-uninitialized]
        *val = ((u64)hi << 32) | lo;
                ^~~~~~~
      drivers/net/dsa/b53/b53_mmap.c: In function 'b53_mmap_read48':
      drivers/net/dsa/b53/b53_mmap.c:91:11: error: 'hi' may be used uninitialized in this function [-Werror=maybe-uninitialized]
         *val = ((u64)hi << 32) | lo;
                 ^~~~~~~
      drivers/net/dsa/b53/b53_mmap.c:83:11: error: 'hi' may be used uninitialized in this function [-Werror=maybe-uninitialized]
         *val = ((u64)hi << 16) | lo;
      
      I have seen the warning before and at the time thought I had fixed
      it with 55e7f6ab ("dsa: b53: fix big-endian register access"),
      however it now came back in a different randconfig build that happens
      to have different inlining decisions in the compiler.
      
      The mistake that gcc makes here is that it thinks the second call to
      readl() might fail because the address 'reg + 4' is not a multiple
      of four despite having knowing that 'reg' itself is a multiple of four.
      
      By open-coding the two reads without the redundant alignment check,
      we can avoid the warning and produce slightly better object code, but
      get slightly longer source code instead.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5eca2914
    • Grygorii Strashko's avatar
      net: ethernet: ti: cpdma: switch to use genalloc · 742fb20f
      Grygorii Strashko authored
      TI CPDMA currently uses a bitmap for tracking descriptors alloactions
      allocations, but The genalloc already handles the same and can be used
      as with special memory (SRAM) as with DMA cherent memory chank
      (dma_alloc_coherent()). Hence, switch to using genalloc and add
      desc_num property for each channel for limitation of max number of
      allowed descriptors for each CPDMA channel. This patch do not affect
      on net throuput.
      Acked-by: default avatarMugunthan V N <mugunthanvnm@ti.com>
      Tested-by: default avatarIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>
      Signed-off-by: default avatarGrygorii Strashko <grygorii.strashko@ti.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      742fb20f
    • Zhao Qiang's avatar
      c37d4a00
  2. 28 Jun, 2016 33 commits
  3. 27 Jun, 2016 4 commits