1. 25 Jan, 2017 11 commits
    • Arnd Bergmann's avatar
      MIPS: Avoid old-style declaration · 42b76a1d
      Arnd Bergmann authored
      gcc warns about nonstandard declarations:
      
      arch/mips/sgi-ip32/ip32-irq.c:31:1: error: 'inline' is not at beginning of declaration [-Werror=old-style-declaration]
      arch/mips/sgi-ip32/ip32-irq.c:36:1: error: 'inline' is not at beginning of declaration [-Werror=old-style-declaration]
      arch/mips/sgi-ip27/ip27-klnuma.c: In function 'replicate_kernel_text':
      arch/mips/sgi-ip27/ip27-klnuma.c:85:116: error: old-style function definition [-Werror=old-style-definition]
      
      Moving 'inline' before the return type, and adding argument types
      shuts up the warning here. This patch affects several platforms,
      but all in a trivial way. I'm fixing up all instances I found in
      any of the 'defconfig' builds.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/15050/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      42b76a1d
    • Arnd Bergmann's avatar
      MIPS: ip22: Fix ip28 build for modern gcc · 23ca9b52
      Arnd Bergmann authored
      kernelci reports a failure of the ip28_defconfig build after upgrading its
      gcc version:
      
      arch/mips/sgi-ip22/Platform:29: *** gcc doesn't support needed option -mr10k-cache-barrier=store.  Stop.
      
      The problem apparently is that the -mr10k-cache-barrier=store option is now
      rejected for CPUs other than r10k. Explicitly including the CPU in the
      check fixes this and is safe because both options were introduced in
      gcc-4.4.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/15049/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      23ca9b52
    • Arnd Bergmann's avatar
      MIPS: Octeon: Avoid empty-body warning · e9663b13
      Arnd Bergmann authored
      gcc-6 reports a harmless build warning:
      
      arch/mips/cavium-octeon/dma-octeon.c: In function 'octeon_dma_alloc_coherent':
      arch/mips/cavium-octeon/dma-octeon.c:179:3: error: suggest braces around empty body in an 'else' statement [-Werror=empty-body]
      
      We can fix this by rearranging the code slightly using the
      IS_ENABLED() macro.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: Hans-Christian Noren Egtvedt <egtvedt@samfundet.no>
      Cc: Vineet Gupta <vgupta@synopsys.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/15048Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      e9663b13
    • Arnd Bergmann's avatar
      MIPS: Loongson64: Fix empty-body warning in dma_alloc · 72d1cfc9
      Arnd Bergmann authored
      A new gcc warning shows up for this old code with gcc-6:
      
      arch/mips/loongson64/common/dma-swiotlb.c: In function 'loongson_dma_alloc_coherent':
      arch/mips/loongson64/common/dma-swiotlb.c:35:2: error: suggest braces around empty body in an 'else' statement [-Werror=empty-body]
      
      The code can be easily restructured to look more readable
      and avoid the warning at the same time.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: Robin Murphy <robin.murphy@arm.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/15047/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      72d1cfc9
    • Arnd Bergmann's avatar
      MIPS: ralink: Remove unused rt*_wdt_reset functions · 886f9c69
      Arnd Bergmann authored
      All pointers to these functions were removed, so now they produce
      warnings:
      
      arch/mips/ralink/rt305x.c:92:13: error: 'rt305x_wdt_reset' defined but not used [-Werror=unused-function]
      
      This removes the functions. If we need them again, the patch can be
      reverted later.
      
      Fixes: f576fb6a ("MIPS: ralink: cleanup the soc specific pinmux data")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: John Crispin <john@phrozen.org>
      Cc: Colin Ian King <colin.king@canonical.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/15044/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      886f9c69
    • Arnd Bergmann's avatar
      MIPS: ralink: Fix request_mem_region error handling · 6d2700a9
      Arnd Bergmann authored
      request_mem_region returns a NULL pointer on error, comparing it
      against a number results in a warning:
      
      arch/mips/ralink/of.c: In function 'plat_of_remap_node':
      arch/mips/ralink/of.c:45:15: error: ordered comparison of pointer with integer zero [-Werror=extra]
      arch/mips/ralink/irq.c: In function 'intc_of_init':
      arch/mips/ralink/irq.c:167:15: error: ordered comparison of pointer with integer zero [-Werror=extra]
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: John Crispin <john@phrozen.org>
      Cc: Tobias Wolf <dev-NTEO@vplace.de>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/15045/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      6d2700a9
    • Arnd Bergmann's avatar
      MIPS: ralink: Remove unused timer functions · d92240d1
      Arnd Bergmann authored
      The functions were originally used for the module unload path,
      but are not referenced any more and just cause warnings:
      
      arch/mips/ralink/timer.c:104:13: error: 'rt_timer_disable' defined but not used [-Werror=unused-function]
      arch/mips/ralink/timer.c:74:13: error: 'rt_timer_free' defined but not used [-Werror=unused-function]
      
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Fixes: 62ee73d2 ("MIPS: ralink: Make timer explicitly non-modular")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: John Crispin <john@phrozen.org>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/15041/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      d92240d1
    • Arnd Bergmann's avatar
      MIPS: Lantiq: Fix another request_mem_region() return code check · 98ea51cb
      Arnd Bergmann authored
      Hauke already fixed a couple of them, but one instance remains
      that checks for a negative integer when it should check
      for a NULL pointer:
      
      arch/mips/lantiq/xway/sysctrl.c: In function 'ltq_soc_init':
      arch/mips/lantiq/xway/sysctrl.c:473:19: error: ordered comparison of pointer with integer zero [-Werror=extra]
      
      Fixes: 6e807852 ("MIPS: Lantiq: Fix check for return value of request_mem_region()")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: John Crispin <john@phrozen.org>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/15043/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      98ea51cb
    • Arnd Bergmann's avatar
      MIPS: Alchemy: Remove duplicate initializer · e4558729
      Arnd Bergmann authored
      We get a harmless warning about a duplicate initalizer for the
      i2c board info structure:
      
      arch/mips/alchemy/board-gpr.c:239:11: error: initialized field overwritten [-Werror=override-init]
      
      As both initializers have the identical value, we can simply drop
      the second one.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/15046/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      e4558729
    • Arnd Bergmann's avatar
      MIPS: 'make -s' should be silent · 8c9b23ff
      Arnd Bergmann authored
      A clean mips64 build produces no output except for two lines:
      
        Checking missing-syscalls for N32
        Checking missing-syscalls for O32
      
      On other architectures, there is no output at all, so let's do the
      same here for the sake of build testing. The 'kecho' macro is used
      to print the message on a normal build but skip it with 'make -s'.
      
      Fixes: e48ce6b8 ("[MIPS] Simplify missing-syscalls for N32 and O32")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: Matt Redfearn <matt.redfearn@imgtec.com>
      Cc: Huacai Chen <chenhc@lemote.com>
      Cc: Maarten ter Huurne <maarten@treewalker.org>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/15040/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      8c9b23ff
    • Arnd Bergmann's avatar
      MIPS: VDSO: avoid duplicate CAC_BASE definition · 1742ac26
      Arnd Bergmann authored
      vdso.h includes <spaces.h> implicitly after defining CONFIG_32BITS.
      This defeats the override in mach-ip27/spaces.h, leading to
      a build error that shows up in kernelci.org:
      
      In file included from arch/mips/include/asm/mach-ip27/spaces.h:29:0,
                       from arch/mips/include/asm/page.h:12,
                       from arch/mips/vdso/vdso.h:26,
                       from arch/mips/vdso/gettimeofday.c:11:
      arch/mips/include/asm/mach-generic/spaces.h:28:0: error: "CAC_BASE" redefined [-Werror]
       #define CAC_BASE  _AC(0x80000000, UL)
      
      An earlier patch tried to make the second definition conditional,
      but that patch had the #ifdef in the wrong place, and would lead
      to another warning:
      
      arch/mips/include/asm/io.h: In function 'phys_to_virt':
      arch/mips/include/asm/io.h:138:9: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
      
      For all I can tell, there is no other reason than vdso32 to ever
      include this file with CONFIG_32BITS set, and the vdso itself should
      never refer to the base addresses as it is running in user space,
      so adding an #ifdef here is safe.
      
      Link: https://patchwork.kernel.org/patch/9418187/
      Fixes: 3ffc17d8 ("MIPS: Adjust MIPS64 CAC_BASE to reflect Config.K0")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/15039/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      1742ac26
  2. 24 Jan, 2017 6 commits
  3. 03 Jan, 2017 23 commits