1. 21 Mar, 2018 1 commit
    • Michał Kępień's avatar
      platform/x86: fujitsu-laptop: Revert UNSUPPORTED_CMD back to an int · 502ab004
      Michał Kępień authored
      UNSUPPORTED_CMD was previously 0x80000000 (int), but commit 819cddae
      ("platform/x86: fujitsu-laptop: Clean up constants") changed it into an
      unsigned long due to BIT() being used to define it.  As call_fext_func()
      returns an int, 0x80000000 would get type promoted when compared to an
      unsigned long, which on a 64-bit system would cause it to become
      0xffffffff80000000 due to sign extension.  This causes one logical
      condition in fujitsu-laptop to always be true and another one to always
      be false on 64-bit systems.  Fix this by reverting UNSUPPORTED_CMD back
      to an int.
      
      This patch fixes the following smatch warnings:
      
      drivers/platform/x86/fujitsu-laptop.c:763 acpi_fujitsu_laptop_leds_register() warn: always true condition '(call_fext_func(device, ((1 << (12)) | (1 << (0))), 2, (1 << (16)), 0) != (1 << (31))) => (s32min-s32max != 2147483648)'
      drivers/platform/x86/fujitsu-laptop.c:816 acpi_fujitsu_laptop_add() warn: impossible condition '(priv->flags_supported == (1 << (31))) => (0-2147483647,18446744071562067968-u64max == 2147483648)'
      
      Fixes: 819cddae ("platform/x86: fujitsu-laptop: Clean up constants")
      Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarMichał Kępień <kernel@kempniu.pl>
      Reviewed-by: default avatarJonathan Woithe <jwoithe@just42.net>
      Signed-off-by: default avatarDarren Hart (VMware) <dvhart@infradead.org>
      502ab004
  2. 14 Mar, 2018 1 commit
    • Darren Hart (VMware)'s avatar
      platform/x86: Fix dell driver init order · 7129707e
      Darren Hart (VMware) authored
      Update the initcall ordering to satisfy the following dependency
      ordering:
      
      1. DCDBAS, ACPI_WMI
      2. DELL_SMBIOS, DELL_RBTN
      3. DELL_LAPTOP, DELL_WMI
      
      By assigning them to the following initcall levels:
      
      subsys_initcall: DCDBAS, ACPI_WMI
      module_init: DELL_SMBIOS, DELL_RBTN
      late_initcall: DELL_LAPTOP, DELL_WMI
      
      Cc: Dominik Brodowski <linux@dominikbrodowski.net>
      Cc: Mario.Limonciello@dell.com
      Signed-off-by: default avatarDarren Hart (VMware) <dvhart@infradead.org>
      7129707e
  3. 12 Mar, 2018 1 commit
    • Darren Hart's avatar
      platform/x86: dell-smbios: Resolve dependency error on ACPI_WMI · 4716007c
      Darren Hart authored
      Similarly to DCDBAS for DELL_SMBIOS_SMM, if DELL_SMBIOS_WMI is enabled,
      DELL_SMBIOS becomes dependent on ACPI_WMI. Update the depends lines to
      prevent a configuration where DELL_SMBIOS=y and either backend
      dependency =m. Update the comment accordingly.
      
      Cc: Mario Limonciello <mario.limonciello@dell.com>
      Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
      Cc: Dominik Brodowski <linux@dominikbrodowski.net>
      Signed-off-by: default avatarDarren Hart (VMware) <dvhart@infradead.org>
      4716007c
  4. 08 Mar, 2018 1 commit
    • Darren Hart (VMware)'s avatar
      platform/x86: dell-smbios: Resolve dependency error on DCDBAS · cc69c88f
      Darren Hart (VMware) authored
      When the DELL_SMBIOS_SMM backend is enabled, the DELL_SMBIOS symbol
      depends on DELL_DCDBAS, and we must avoid the situation where
      DELL_SMBIOS=y and DCDBAS=m.
      
      Adding the conditional dependency to DELL_SMBIOS such as:
      
      depends !DELL_SMBIOS_SMM || (DCDBAS || DCDBAS=n)
      
      results in the Kconfig tooling complaining about a circular dependency,
      although it appears to work in practice.
      
      Avoid the errors by simplifying the dependency and forcing DELL_SMBIOS
      to be <= DCDBAS if DCDBAS is enabled (thanks to Greg KH for the
      suggestion).
      
      Cc: Mario.Limonciello@dell.com
      Signed-off-by: default avatarDarren Hart (VMware) <dvhart@infradead.org>
      cc69c88f
  5. 05 Mar, 2018 1 commit
    • Darren Hart (VMware)'s avatar
      platform/x86: Allow for SMBIOS backend defaults · c715e434
      Darren Hart (VMware) authored
      Avoid accidental configurations by setting default y for DELL_SMBIOS
      backends. Avoid this impacting the default build size, by making them
      dependent on DELL_SMBIOS, so they only appear when DELL_SMBIOS is
      manually selected, or by DELL_LAPTOP or DELL_WMI.
      
      While DELL_SMBIOS does have a prompt, it does not have any dependencies.
      Keeping DELL_SMBIOS visible, despite being "select"ed by DELL_LAPTOP and
      DELL_WMI, is a deliberate choice to provide context for the WMI and SMM
      backends, which would otherwise appear to float without context within
      the menu.
      Signed-off-by: default avatarDarren Hart (VMware) <dvhart@infradead.org>
      c715e434
  6. 03 Mar, 2018 3 commits
  7. 01 Mar, 2018 1 commit
  8. 28 Feb, 2018 2 commits
  9. 24 Feb, 2018 8 commits
  10. 23 Feb, 2018 9 commits
  11. 19 Feb, 2018 1 commit
  12. 15 Feb, 2018 6 commits
  13. 11 Feb, 2018 5 commits
    • Linus Torvalds's avatar
      Linux 4.16-rc1 · 7928b2cb
      Linus Torvalds authored
      7928b2cb
    • Al Viro's avatar
      unify {de,}mangle_poll(), get rid of kernel-side POLL... · 7a163b21
      Al Viro authored
      except, again, POLLFREE and POLL_BUSY_LOOP.
      
      With this, we finally get to the promised end result:
      
       - POLL{IN,OUT,...} are plain integers and *not* in __poll_t, so any
         stray instances of ->poll() still using those will be caught by
         sparse.
      
       - eventpoll.c and select.c warning-free wrt __poll_t
      
       - no more kernel-side definitions of POLL... - userland ones are
         visible through the entire kernel (and used pretty much only for
         mangle/demangle)
      
       - same behavior as after the first series (i.e. sparc et.al. epoll(2)
         working correctly).
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      7a163b21
    • Linus Torvalds's avatar
      vfs: do bulk POLL* -> EPOLL* replacement · a9a08845
      Linus Torvalds authored
      This is the mindless scripted replacement of kernel use of POLL*
      variables as described by Al, done by this script:
      
          for V in IN OUT PRI ERR RDNORM RDBAND WRNORM WRBAND HUP RDHUP NVAL MSG; do
              L=`git grep -l -w POLL$V | grep -v '^t' | grep -v /um/ | grep -v '^sa' | grep -v '/poll.h$'|grep -v '^D'`
              for f in $L; do sed -i "-es/^\([^\"]*\)\(\<POLL$V\>\)/\\1E\\2/" $f; done
          done
      
      with de-mangling cleanups yet to come.
      
      NOTE! On almost all architectures, the EPOLL* constants have the same
      values as the POLL* constants do.  But they keyword here is "almost".
      For various bad reasons they aren't the same, and epoll() doesn't
      actually work quite correctly in some cases due to this on Sparc et al.
      
      The next patch from Al will sort out the final differences, and we
      should be all done.
      Scripted-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a9a08845
    • Linus Torvalds's avatar
      Merge branch 'work.poll2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · ee5daa13
      Linus Torvalds authored
      Pull more poll annotation updates from Al Viro:
       "This is preparation to solving the problems you've mentioned in the
        original poll series.
      
        After this series, the kernel is ready for running
      
            for V in IN OUT PRI ERR RDNORM RDBAND WRNORM WRBAND HUP RDHUP NVAL MSG; do
                  L=`git grep -l -w POLL$V | grep -v '^t' | grep -v /um/ | grep -v '^sa' | grep -v '/poll.h$'|grep -v '^D'`
                  for f in $L; do sed -i "-es/^\([^\"]*\)\(\<POLL$V\>\)/\\1E\\2/" $f; done
            done
      
        as a for bulk search-and-replace.
      
        After that, the kernel is ready to apply the patch to unify
        {de,}mangle_poll(), and then get rid of kernel-side POLL... uses
        entirely, and we should be all done with that stuff.
      
        Basically, that's what you suggested wrt KPOLL..., except that we can
        use EPOLL... instead - they already are arch-independent (and equal to
        what is currently kernel-side POLL...).
      
        After the preparations (in this series) switch to returning EPOLL...
        from ->poll() instances is completely mechanical and kernel-side
        POLL... can go away. The last step (killing kernel-side POLL... and
        unifying {de,}mangle_poll() has to be done after the
        search-and-replace job, since we need userland-side POLL... for
        unified {de,}mangle_poll(), thus the cherry-pick at the last step.
      
        After that we will have:
      
         - POLL{IN,OUT,...} *not* in __poll_t, so any stray instances of
           ->poll() still using those will be caught by sparse.
      
         - eventpoll.c and select.c warning-free wrt __poll_t
      
         - no more kernel-side definitions of POLL... - userland ones are
           visible through the entire kernel (and used pretty much only for
           mangle/demangle)
      
         - same behavior as after the first series (i.e. sparc et.al. epoll(2)
           working correctly)"
      
      * 'work.poll2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        annotate ep_scan_ready_list()
        ep_send_events_proc(): return result via esed->res
        preparation to switching ->poll() to returning EPOLL...
        add EPOLLNVAL, annotate EPOLL... and event_poll->event
        use linux/poll.h instead of asm/poll.h
        xen: fix poll misannotation
        smc: missing poll annotations
      ee5daa13
    • Linus Torvalds's avatar
      Merge tag 'xtensa-20180211' of git://github.com/jcmvbkbc/linux-xtensa · 3fc928dc
      Linus Torvalds authored
      Pull xtense fix from Max Filippov:
       "Build fix for xtensa architecture with KASAN enabled"
      
      * tag 'xtensa-20180211' of git://github.com/jcmvbkbc/linux-xtensa:
        xtensa: fix build with KASAN
      3fc928dc