1. 12 Oct, 2017 36 commits
  2. 08 Oct, 2017 4 commits
    • Greg Kroah-Hartman's avatar
      Linux 4.4.91 · c030c36a
      Greg Kroah-Hartman authored
      c030c36a
    • Arnd Bergmann's avatar
      ttpci: address stringop overflow warning · 2536c20e
      Arnd Bergmann authored
      commit 69d3973a upstream.
      
      gcc-7.0.1 warns about old code in ttpci:
      
      In file included from drivers/media/pci/ttpci/av7110.c:63:0:
      In function 'irdebi.isra.2',
          inlined from 'start_debi_dma' at drivers/media/pci/ttpci/av7110.c:376:3,
          inlined from 'gpioirq' at drivers/media/pci/ttpci/av7110.c:659:3:
      drivers/media/pci/ttpci/av7110_hw.h:406:3: warning: 'memcpy': specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
         memcpy(av7110->debi_virt, (char *) &res, count);
      In function 'irdebi.isra.2',
          inlined from 'start_debi_dma' at drivers/media/pci/ttpci/av7110.c:376:3,
          inlined from 'gpioirq' at drivers/media/pci/ttpci/av7110.c:668:3:
      drivers/media/pci/ttpci/av7110_hw.h:406:3: warning: 'memcpy': specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
         memcpy(av7110->debi_virt, (char *) &res, count);
      
      Apparently, 'count' can be negative here, which will then get turned
      into a giant size argument for memcpy. Changing the sizes to 'unsigned
      int' instead seems safe as we already check for maximum sizes, and it
      also simplifies the code a bit.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2536c20e
    • Arnd Bergmann's avatar
      ALSA: au88x0: avoid theoretical uninitialized access · 2b2bfb53
      Arnd Bergmann authored
      commit 13f99ebd upstream.
      
      The latest gcc-7.0.1 snapshot points out that we if nr_ch is zero, we never
      initialize some variables:
      
      sound/pci/au88x0/au88x0_core.c: In function 'vortex_adb_allocroute':
      sound/pci/au88x0/au88x0_core.c:2304:68: error: 'mix[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      sound/pci/au88x0/au88x0_core.c:2305:58: error: 'src[0]' may be used uninitialized in this function [-Werror=maybe-uninitialized]
      
      I assume this can never happen in practice, but adding a check here doesn't
      hurt either and avoids the warning. The code has been unchanged since
      the start of git history.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      2b2bfb53
    • Arnd Bergmann's avatar
      ARM: remove duplicate 'const' annotations' · d32ee702
      Arnd Bergmann authored
      commit 0527873b upstream.
      
      gcc-7 warns about some declarations that are more 'const' than necessary:
      
      arch/arm/mach-at91/pm.c:338:34: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
       static const struct of_device_id const ramc_ids[] __initconst = {
      arch/arm/mach-bcm/bcm_kona_smc.c:36:34: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
       static const struct of_device_id const bcm_kona_smc_ids[] __initconst = {
      arch/arm/mach-spear/time.c:207:34: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
       static const struct of_device_id const timer_of_match[] __initconst = {
      arch/arm/mach-omap2/prm_common.c:714:34: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
       static const struct of_device_id const omap_prcm_dt_match_table[] __initconst = {
      arch/arm/mach-omap2/vc.c:562:35: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
       static const struct i2c_init_data const omap4_i2c_timing_data[] __initconst = {
      
      The ones in arch/arm were apparently all introduced accidentally by one
      commit that correctly marked a lot of variables as __initconst.
      
      Fixes: 19c233b7 ("ARM: appropriate __init annotation for const data")
      Acked-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
      Acked-by: default avatarTony Lindgren <tony@atomide.com>
      Acked-by: default avatarNicolas Pitre <nico@linaro.org>
      Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Acked-by: default avatarKrzysztof Hałasa <khalasa@piap.pl>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d32ee702