1. 04 Aug, 2016 5 commits
    • Krzysztof Kozlowski's avatar
      dma-mapping: use unsigned long for dma_attrs · 00085f1e
      Krzysztof Kozlowski authored
      The dma-mapping core and the implementations do not change the DMA
      attributes passed by pointer.  Thus the pointer can point to const data.
      However the attributes do not have to be a bitfield.  Instead unsigned
      long will do fine:
      
      1. This is just simpler.  Both in terms of reading the code and setting
         attributes.  Instead of initializing local attributes on the stack
         and passing pointer to it to dma_set_attr(), just set the bits.
      
      2. It brings safeness and checking for const correctness because the
         attributes are passed by value.
      
      Semantic patches for this change (at least most of them):
      
          virtual patch
          virtual context
      
          @r@
          identifier f, attrs;
      
          @@
          f(...,
          - struct dma_attrs *attrs
          + unsigned long attrs
          , ...)
          {
          ...
          }
      
          @@
          identifier r.f;
          @@
          f(...,
          - NULL
          + 0
           )
      
      and
      
          // Options: --all-includes
          virtual patch
          virtual context
      
          @r@
          identifier f, attrs;
          type t;
      
          @@
          t f(..., struct dma_attrs *attrs);
      
          @@
          identifier r.f;
          @@
          f(...,
          - NULL
          + 0
           )
      
      Link: http://lkml.kernel.org/r/1468399300-5399-2-git-send-email-k.kozlowski@samsung.comSigned-off-by: default avatarKrzysztof Kozlowski <k.kozlowski@samsung.com>
      Acked-by: default avatarVineet Gupta <vgupta@synopsys.com>
      Acked-by: default avatarRobin Murphy <robin.murphy@arm.com>
      Acked-by: default avatarHans-Christian Noren Egtvedt <egtvedt@samfundet.no>
      Acked-by: Mark Salter <msalter@redhat.com> [c6x]
      Acked-by: Jesper Nilsson <jesper.nilsson@axis.com> [cris]
      Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> [drm]
      Reviewed-by: default avatarBart Van Assche <bart.vanassche@sandisk.com>
      Acked-by: Joerg Roedel <jroedel@suse.de> [iommu]
      Acked-by: Fabien Dessenne <fabien.dessenne@st.com> [bdisp]
      Reviewed-by: Marek Szyprowski <m.szyprowski@samsung.com> [vb2-core]
      Acked-by: David Vrabel <david.vrabel@citrix.com> [xen]
      Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> [xen swiotlb]
      Acked-by: Joerg Roedel <jroedel@suse.de> [iommu]
      Acked-by: Richard Kuo <rkuo@codeaurora.org> [hexagon]
      Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> [m68k]
      Acked-by: Gerald Schaefer <gerald.schaefer@de.ibm.com> [s390]
      Acked-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
      Acked-by: Hans-Christian Noren Egtvedt <egtvedt@samfundet.no> [avr32]
      Acked-by: Vineet Gupta <vgupta@synopsys.com> [arc]
      Acked-by: Robin Murphy <robin.murphy@arm.com> [arm64 and dma-iommu]
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      00085f1e
    • Krzysztof Kozlowski's avatar
    • Andrew Morton's avatar
      include/linux/bitmap.h: cleanup · 4b9d314c
      Andrew Morton authored
      Remove two unneeded `else's.
      
      Cc: David Hildenbrand <dahi@linux.vnet.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      4b9d314c
    • Masahiro Yamada's avatar
      tree-wide: replace config_enabled() with IS_ENABLED() · 97f2645f
      Masahiro Yamada authored
      The use of config_enabled() against config options is ambiguous.  In
      practical terms, config_enabled() is equivalent to IS_BUILTIN(), but the
      author might have used it for the meaning of IS_ENABLED().  Using
      IS_ENABLED(), IS_BUILTIN(), IS_MODULE() etc.  makes the intention
      clearer.
      
      This commit replaces config_enabled() with IS_ENABLED() where possible.
      This commit is only touching bool config options.
      
      I noticed two cases where config_enabled() is used against a tristate
      option:
      
       - config_enabled(CONFIG_HWMON)
        [ drivers/net/wireless/ath/ath10k/thermal.c ]
      
       - config_enabled(CONFIG_BACKLIGHT_CLASS_DEVICE)
        [ drivers/gpu/drm/gma500/opregion.c ]
      
      I did not touch them because they should be converted to IS_BUILTIN()
      in order to keep the logic, but I was not sure it was the authors'
      intention.
      
      Link: http://lkml.kernel.org/r/1465215656-20569-1-git-send-email-yamada.masahiro@socionext.comSigned-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Acked-by: default avatarKees Cook <keescook@chromium.org>
      Cc: Stas Sergeev <stsp@list.ru>
      Cc: Matt Redfearn <matt.redfearn@imgtec.com>
      Cc: Joshua Kinard <kumba@gentoo.org>
      Cc: Jiri Slaby <jslaby@suse.com>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: Markos Chandras <markos.chandras@imgtec.com>
      Cc: "Dmitry V. Levin" <ldv@altlinux.org>
      Cc: yu-cheng yu <yu-cheng.yu@intel.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Brian Gerst <brgerst@gmail.com>
      Cc: Johannes Berg <johannes@sipsolutions.net>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Will Drewry <wad@chromium.org>
      Cc: Nikolay Martynov <mar.kolya@gmail.com>
      Cc: Huacai Chen <chenhc@lemote.com>
      Cc: "H. Peter Anvin" <hpa@zytor.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
      Cc: Rafal Milecki <zajec5@gmail.com>
      Cc: James Cowgill <James.Cowgill@imgtec.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Alex Smith <alex.smith@imgtec.com>
      Cc: Adam Buchbinder <adam.buchbinder@gmail.com>
      Cc: Qais Yousef <qais.yousef@imgtec.com>
      Cc: Jiang Liu <jiang.liu@linux.intel.com>
      Cc: Mikko Rapeli <mikko.rapeli@iki.fi>
      Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
      Cc: Denys Vlasenko <dvlasenk@redhat.com>
      Cc: Brian Norris <computersforpeace@gmail.com>
      Cc: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
      Cc: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
      Cc: Andy Lutomirski <luto@amacapital.net>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
      Cc: Roland McGrath <roland@hack.frob.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: Kalle Valo <kvalo@qca.qualcomm.com>
      Cc: Viresh Kumar <viresh.kumar@linaro.org>
      Cc: Tony Wu <tung7970@gmail.com>
      Cc: Huaitong Han <huaitong.han@intel.com>
      Cc: Sumit Semwal <sumit.semwal@linaro.org>
      Cc: Alexei Starovoitov <ast@kernel.org>
      Cc: Juergen Gross <jgross@suse.com>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Andrea Gelmini <andrea.gelmini@gelma.net>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Rabin Vincent <rabin@rab.in>
      Cc: "Maciej W. Rozycki" <macro@imgtec.com>
      Cc: David Daney <david.daney@cavium.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      97f2645f
    • Sudip Mukherjee's avatar
      drivers/fpga/Kconfig: fix build failure · 1c8cb409
      Sudip Mukherjee authored
      While building m32r allmodconfig the build is failing with the error:
      
        ERROR: "bad_dma_ops" [drivers/fpga/zynq-fpga.ko] undefined!
      
      Xilinx Zynq FPGA is using DMA but there was no dependency while
      building.
      
      Link: http://lkml.kernel.org/r/1464346526-13913-1-git-send-email-sudipm.mukherjee@gmail.comSigned-off-by: default avatarSudip Mukherjee <sudip.mukherjee@codethink.co.uk>
      Acked-by: default avatarMoritz Fischer <moritz.fischer@ettus.com>
      Cc: Alan Tull <atull@opensource.altera.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      1c8cb409
  2. 03 Aug, 2016 4 commits
    • Linus Torvalds's avatar
      Merge tag 'trace-v4.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · bf0f500b
      Linus Torvalds authored
      Pull tracing fixes from Steven Rostedt:
       "A few updates and fixes:
      
         - move the suppressing of the __builtin_return_address >0 warning to
           the tracing directory only.
      
         - metag recordmcount fix for newer glibc's
      
         - two tracing histogram fixes that were reported by KASAN"
      
      * tag 'trace-v4.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        tracing: Fix use-after-free in hist_register_trigger()
        tracing: Fix use-after-free in hist_unreg_all/hist_enable_unreg_all
        Makefile: Mute warning for __builtin_return_address(>0) for tracing only
        ftrace/recordmcount: Work around for addition of metag magic but not relocations
      bf0f500b
    • Geert Uytterhoeven's avatar
      fs/proc: Add compiler check for -Wno-override-init to support gcc < 4.2 · 4b2e0162
      Geert Uytterhoeven authored
      With gcc < 4.2 (e.g. 4.1.2):
      
            CC      fs/proc/task_mmu.o
          cc1: error: unrecognized command line option "-Wno-override-init"
      
      To fix this, only enable the compiler option when it is actually
      supported by the compiler.
      
      Fixes: ca52953f ("fs/proc/task_mmu.c: suppress compilation warnings with W=1")
      Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
      Acked-by: default avatarValdis Kletnieks <valdis.kletnieks@vt.edu>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      4b2e0162
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · f0936155
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Fix several cases of missing of_node_put() calls in various
          networking drivers.  From Peter Chen.
      
       2) Don't try to remove unconfigured VLANs in qed driver, from Yuval
          Mintz.
      
       3) Unbalanced locking in TIPC error handling, from Wei Yongjun.
      
       4) Fix lockups in CPDMA driver, from Grygorii Strashko.
      
       5) More MACSEC refcount et al fixes, from Sabrina Dubroca.
      
       6) Fix MAC address setting in r8169 during runtime suspend, from
          Chun-Hao Lin.
      
       7) Various printf format specifier fixes, from Heinrich Schuchardt.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (59 commits)
        qed: Fail driver load in 100g MSI mode.
        ethernet: ti: davinci_emac: add missing of_node_put after calling of_parse_phandle
        ethernet: stmicro: stmmac: add missing of_node_put after calling of_parse_phandle
        ethernet: stmicro: stmmac: dwmac-socfpga: add missing of_node_put after calling of_parse_phandle
        ethernet: renesas: sh_eth: add missing of_node_put after calling of_parse_phandle
        ethernet: renesas: ravb_main: add missing of_node_put after calling of_parse_phandle
        ethernet: marvell: pxa168_eth: add missing of_node_put after calling of_parse_phandle
        ethernet: marvell: mvpp2: add missing of_node_put after calling of_parse_phandle
        ethernet: marvell: mvneta: add missing of_node_put after calling of_parse_phandle
        ethernet: hisilicon: hns: hns_dsaf_main: add missing of_node_put after calling of_parse_phandle
        ethernet: hisilicon: hns: hns_dsaf_mac: add missing of_node_put after calling of_parse_phandle
        ethernet: cavium: octeon: add missing of_node_put after calling of_parse_phandle
        ethernet: aurora: nb8800: add missing of_node_put after calling of_parse_phandle
        ethernet: arc: emac_main: add missing of_node_put after calling of_parse_phandle
        ethernet: apm: xgene: add missing of_node_put after calling of_parse_phandle
        ethernet: altera: add missing of_node_put
        8139too: fix system hang when there is a tx timeout event.
        qed: Fix error return code in qed_resc_alloc()
        net: qlcnic: avoid superfluous assignement
        dsa: b53: remove redundant if
        ...
      f0936155
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · d52bd54d
      Linus Torvalds authored
      Merge yet more updates from Andrew Morton:
      
       - the rest of ocfs2
      
       - various hotfixes, mainly MM
      
       - quite a bit of misc stuff - drivers, fork, exec, signals, etc.
      
       - printk updates
      
       - firmware
      
       - checkpatch
      
       - nilfs2
      
       - more kexec stuff than usual
      
       - rapidio updates
      
       - w1 things
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>: (111 commits)
        ipc: delete "nr_ipc_ns"
        kcov: allow more fine-grained coverage instrumentation
        init/Kconfig: add clarification for out-of-tree modules
        config: add android config fragments
        init/Kconfig: ban CONFIG_LOCALVERSION_AUTO with allmodconfig
        relay: add global mode support for buffer-only channels
        init: allow blacklisting of module_init functions
        w1:omap_hdq: fix regression
        w1: add helper macro module_w1_family
        w1: remove need for ida and use PLATFORM_DEVID_AUTO
        rapidio/switches: add driver for IDT gen3 switches
        powerpc/fsl_rio: apply changes for RIO spec rev 3
        rapidio: modify for rev.3 specification changes
        rapidio: change inbound window size type to u64
        rapidio/idt_gen2: fix locking warning
        rapidio: fix error handling in mbox request/release functions
        rapidio/tsi721_dma: advance queue processing from transfer submit call
        rapidio/tsi721: add messaging mbox selector parameter
        rapidio/tsi721: add PCIe MRRS override parameter
        rapidio/tsi721_dma: add channel mask and queue size parameters
        ...
      d52bd54d
  3. 02 Aug, 2016 31 commits