1. 30 Jul, 2015 27 commits
  2. 24 Jun, 2015 1 commit
  3. 23 Jun, 2015 12 commits
    • Tim Gardner's avatar
      fs: namespace: suppress 'may be used uninitialized' warnings · cafc8384
      Tim Gardner authored
      commit b8850d1f upstream.
      
      The gcc version 4.9.1 compiler complains Even though it isn't possible for
      these variables to not get initialized before they are used.
      
      fs/namespace.c: In function ‘SyS_mount’:
      fs/namespace.c:2720:8: warning: ‘kernel_dev’ may be used uninitialized in this function [-Wmaybe-uninitialized]
        ret = do_mount(kernel_dev, kernel_dir->name, kernel_type, flags,
              ^
      fs/namespace.c:2699:8: note: ‘kernel_dev’ was declared here
        char *kernel_dev;
              ^
      fs/namespace.c:2720:8: warning: ‘kernel_type’ may be used uninitialized in this function [-Wmaybe-uninitialized]
        ret = do_mount(kernel_dev, kernel_dir->name, kernel_type, flags,
              ^
      fs/namespace.c:2697:8: note: ‘kernel_type’ was declared here
        char *kernel_type;
              ^
      
      Fix the warnings by simplifying copy_mount_string() as suggested by Al Viro.
      
      Cc: Alexander Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      cafc8384
    • Mark Brown's avatar
      ASoC: imx-audmux: Use uintptr_t for port numbers · 8a0590bf
      Mark Brown authored
      commit e5f89768 upstream.
      
      Since we pass the port number through file private data for debugfs we cast
      it to and from a pointer so use uintptr_t in order to ensure that the
      types are compatible, avoiding warnings on 64 bit platforms where pointers
      are 64 bit and unsigned integers 32 bit.
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      8a0590bf
    • Mark Hambleton's avatar
      arm64: cmpxchg: update macros to prevent warnings · 12c55b60
      Mark Hambleton authored
      commit 60010e50 upstream.
      
      Make sure the value we are going to return is referenced in order to
      avoid warnings from newer GCCs such as:
      
      arch/arm64/include/asm/cmpxchg.h:162:3: warning: value computed is not used [-Wunused-value]
        ((__typeof__(*(ptr)))__cmpxchg_mb((ptr),   \
         ^
      net/netfilter/nf_conntrack_core.c:674:2: note: in expansion of macro ‘cmpxchg’
        cmpxchg(&nf_conntrack_hash_rnd, 0, rand);
      
      [Modified to use the current underlying implementation as current
      mainline for both cmpxchg() and cmpxchg_local() does -- broonie]
      Signed-off-by: default avatarMark Hambleton <mahamble@broadcom.com>
      Signed-off-by: default avatarMark Brown <broonie@linaro.org>
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      12c55b60
    • Will Deacon's avatar
      arm64: xchg: prevent warning if return value is unused · 75ef6b49
      Will Deacon authored
      commit e1dfda9c upstream.
      
      Some users of xchg() don't bother using the return value, which results
      in a compiler warning like the following (from kgdb):
      
      In file included from linux/arch/arm64/include/asm/atomic.h:27:0,
                       from include/linux/atomic.h:4,
                       from include/linux/spinlock.h:402,
                       from include/linux/seqlock.h:35,
                       from include/linux/time.h:5,
                       from include/uapi/linux/timex.h:56,
                       from include/linux/timex.h:56,
                       from include/linux/sched.h:19,
                       from include/linux/pid_namespace.h:4,
                       from kernel/debug/debug_core.c:30:
      kernel/debug/debug_core.c: In function ‘kgdb_cpu_enter’:
      linux/arch/arm64/include/asm/cmpxchg.h:75:3: warning: value computed is not used [-Wunused-value]
        ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr))))
         ^
      linux/arch/arm64/include/asm/atomic.h:132:30: note: in expansion of macro ‘xchg’
       #define atomic_xchg(v, new) (xchg(&((v)->counter), new))
      
      kernel/debug/debug_core.c:504:4: note: in expansion of macro ‘atomic_xchg’
          atomic_xchg(&kgdb_active, cpu);
          ^
      
      This patch makes use of the same trick as we do for cmpxchg, by assigning
      the return value to a dummy variable in the xchg() macro itself.
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      75ef6b49
    • Tim Gardner's avatar
      scripts/sortextable: suppress warning: `relocs_size' may be used uninitialized · f0e94388
      Tim Gardner authored
      commit 7cbc0ea7 upstream.
      
      In file included from scripts/sortextable.c:194:0:
      scripts/sortextable.c: In function `main':
      scripts/sortextable.h:176:3: warning: `relocs_size' may be used uninitialized in this function [-Wmaybe-uninitialized]
         memset(relocs, 0, relocs_size);
         ^
      scripts/sortextable.h:106:6: note: `relocs_size' was declared here
        int relocs_size;
            ^
      In file included from scripts/sortextable.c:192:0:
      scripts/sortextable.h:176:3: warning: `relocs_size' may be used uninitialized in this function [-Wmaybe-uninitialized]
         memset(relocs, 0, relocs_size);
         ^
      scripts/sortextable.h:106:6: note: `relocs_size' was declared here
        int relocs_size;
            ^
      
      gcc 4.9.1
      Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
      Reviewed-by: default avatarJamie Iles <jamie.iles@oracle.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      f0e94388
    • Jan Kara's avatar
      udf: Check length of extended attributes and allocation descriptors · aa826bb1
      Jan Kara authored
      commit 23b133bd upstream.
      
      Check length of extended attributes and allocation descriptors when
      loading inodes from disk. Otherwise corrupted filesystems could confuse
      the code and make the kernel oops.
      Reported-by: default avatarCarl Henrik Lunde <chlunde@ping.uio.no>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      aa826bb1
    • Jan Kara's avatar
      udf: Remove repeated loads blocksize · 50badb21
      Jan Kara authored
      commit 79144954 upstream.
      
      Store blocksize in a local variable in udf_fill_inode() since it is used
      a lot of times.
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      50badb21
    • Lenny Szubowicz's avatar
      cpufreq: pcc: Enable autoload of pcc-cpufreq for ACPI processors · 17459111
      Lenny Szubowicz authored
      commit 7e7e8fe6 upstream.
      
      The pcc-cpufreq driver is not automatically loaded on systems where
      the platform's power management setting requires this driver.
      Instead, on those systems no CPU frequency driver is registered and
      active.
      
      Make the autoloading matching criteria for loading the pcc-cpufreq
      driver the same as done in acpi-cpufreq by commit c655affb
      ("ACPI / cpufreq: Add ACPI processor device IDs to acpi-cpufreq").
      
      x86 CPU frequency drivers are now typically autoloaded by specifying
      MODULE_DEVICE_TABLE entries and x86cpu model specific matching.
      But pcc-cpufreq was omitted when acpi-cpufreq and other drivers were
      changed to use this approach.
      
      Both acpi-cpufreq and pcc-cpufreq depend on a distinct and mutually
      exclusive set of ACPI methods which are not directly tied to specific
      processor model numbers. Both of these drivers have init routines
      which look for their required ACPI methods. As a result, only the
      appropriate driver registers as the cpu frequency driver and the other
      one ends up being unloaded.
      
      Tested on various systems where acpi-cpufreq, intel_pstate, and
      pcc-cpufreq are the expected cpu frequency drivers.
      Signed-off-by: default avatarLenny Szubowicz <lszubowi@redhat.com>
      Signed-off-by: default avatarJoseph Szczypek <joseph.szczypek@hp.com>
      Reported-by: default avatarTrinh Dao <trinh.dao@hp.com>
      Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      17459111
    • Yoshihiro Shimoda's avatar
      usb: renesas_usbhs: Don't disable the pipe if Control write status stage · b4c25261
      Yoshihiro Shimoda authored
      commit 93fb9127 upstream.
      
      This patch fixes an issue that sometimes this controller is not able
      to complete the Control write status stage.
      
      This driver should enable DCPCTR.CCPL and PID_BUF to complete the status
      stage. However, if this driver detects the ctrl_stage interruption first
      before the control write data is received, this driver will clear the
      PID_BUF wrongly in the usbhsf_pio_try_pop(). To avoid this issue, this
      patch doesn't clear the PID_BUF in the usbhsf_pio_try_pop().
      (Since also the privious code doesn't disable the PID_BUF after a control
       transfer was finished, this patch doesn't have any side efforts.)
      Signed-off-by: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      b4c25261
    • Kazuya Mizuguchi's avatar
      usb: renesas_usbhs: Fix fifo unclear in usbhsf_prepare_pop · 0df0329a
      Kazuya Mizuguchi authored
      commit e73d42f1 upstream.
      
      This patch fixes an issue for control write. When usbhsf_prepare_pop()
      is called after this driver called a gadget setup function, this controller
      doesn't receive the control write data. So, this patch adds a code to clear
      the fifo for control write in usbhsf_prepare_pop().
      Signed-off-by: default avatarKazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com>
      Signed-off-by: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
      Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      0df0329a
    • Adam Jackson's avatar
      drm/mgag200: Reject non-character-cell-aligned mode widths · cd717d14
      Adam Jackson authored
      commit 25161084 upstream.
      
      Turns out 1366x768 does not in fact work on this hardware.
      Signed-off-by: default avatarAdam Jackson <ajax@redhat.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      cd717d14
    • Steven Rostedt's avatar
      tracing: Have filter check for balanced ops · 6ad4382d
      Steven Rostedt authored
      commit 2cf30dc1 upstream.
      
      When the following filter is used it causes a warning to trigger:
      
       # cd /sys/kernel/debug/tracing
       # echo "((dev==1)blocks==2)" > events/ext4/ext4_truncate_exit/filter
      -bash: echo: write error: Invalid argument
       # cat events/ext4/ext4_truncate_exit/filter
      ((dev==1)blocks==2)
      ^
      parse_error: No error
      
       ------------[ cut here ]------------
       WARNING: CPU: 2 PID: 1223 at kernel/trace/trace_events_filter.c:1640 replace_preds+0x3c5/0x990()
       Modules linked in: bnep lockd grace bluetooth  ...
       CPU: 3 PID: 1223 Comm: bash Tainted: G        W       4.1.0-rc3-test+ #450
       Hardware name: Hewlett-Packard HP Compaq Pro 6300 SFF/339A, BIOS K01 v02.05 05/07/2012
        0000000000000668 ffff8800c106bc98 ffffffff816ed4f9 ffff88011ead0cf0
        0000000000000000 ffff8800c106bcd8 ffffffff8107fb07 ffffffff8136b46c
        ffff8800c7d81d48 ffff8800d4c2bc00 ffff8800d4d4f920 00000000ffffffea
       Call Trace:
        [<ffffffff816ed4f9>] dump_stack+0x4c/0x6e
        [<ffffffff8107fb07>] warn_slowpath_common+0x97/0xe0
        [<ffffffff8136b46c>] ? _kstrtoull+0x2c/0x80
        [<ffffffff8107fb6a>] warn_slowpath_null+0x1a/0x20
        [<ffffffff81159065>] replace_preds+0x3c5/0x990
        [<ffffffff811596b2>] create_filter+0x82/0xb0
        [<ffffffff81159944>] apply_event_filter+0xd4/0x180
        [<ffffffff81152bbf>] event_filter_write+0x8f/0x120
        [<ffffffff811db2a8>] __vfs_write+0x28/0xe0
        [<ffffffff811dda43>] ? __sb_start_write+0x53/0xf0
        [<ffffffff812e51e0>] ? security_file_permission+0x30/0xc0
        [<ffffffff811dc408>] vfs_write+0xb8/0x1b0
        [<ffffffff811dc72f>] SyS_write+0x4f/0xb0
        [<ffffffff816f5217>] system_call_fastpath+0x12/0x6a
       ---[ end trace e11028bd95818dcd ]---
      
      Worse yet, reading the error message (the filter again) it says that
      there was no error, when there clearly was. The issue is that the
      code that checks the input does not check for balanced ops. That is,
      having an op between a closed parenthesis and the next token.
      
      This would only cause a warning, and fail out before doing any real
      harm, but it should still not caues a warning, and the error reported
      should work:
      
       # cd /sys/kernel/debug/tracing
       # echo "((dev==1)blocks==2)" > events/ext4/ext4_truncate_exit/filter
      -bash: echo: write error: Invalid argument
       # cat events/ext4/ext4_truncate_exit/filter
      ((dev==1)blocks==2)
      ^
      parse_error: Meaningless filter expression
      
      And give no kernel warning.
      
      Link: http://lkml.kernel.org/r/20150615175025.7e809215@gandalf.local.home
      
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
      Reported-by: default avatarVince Weaver <vincent.weaver@maine.edu>
      Tested-by: default avatarVince Weaver <vincent.weaver@maine.edu>
      Signed-off-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      [js: 3.12 has no OP_NOT yet, I dropped that if]
      6ad4382d