linux_dsm_epyc7002/arch/s390/include/asm
Krzysztof Kozlowski 00085f1efa dma-mapping: use unsigned long for dma_attrs
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.com
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Vineet Gupta <vgupta@synopsys.com>
Acked-by: Robin Murphy <robin.murphy@arm.com>
Acked-by: Hans-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: Bart 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: Bjorn 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: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-08-04 08:50:07 -04:00
..
fpu Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2016-07-26 12:22:51 -07:00
trace s390/diag: add a s390 prefix to the diagnose trace point 2015-11-09 09:10:47 +01:00
airq.h
appldata.h s390/diag: add a statistic for diagnose calls 2015-10-14 14:32:06 +02:00
asm-offsets.h
atomic.h locking/atomic: Remove linux/atomic.h:atomic_fetch_or() 2016-06-16 10:48:32 +02:00
barrier.h s390: more efficient smp barriers 2016-01-12 20:47:05 +02:00
bitops.h s390/bitops: remove 31 bit related comments 2015-10-14 14:32:15 +02:00
bug.h
bugs.h
cache.h s390: use __section macro everywhere 2016-06-13 15:58:23 +02:00
cacheflush.h
ccwdev.h
ccwgroup.h
checksum.h ipv4: Update parameters for csum_tcpudp_magic to their original types 2016-03-13 23:55:13 -04:00
chpid.h
cio.h s390/time: STP sync clock correction 2016-06-13 15:58:19 +02:00
clp.h s390/pci: add ioctl interface for CLP 2016-03-07 16:54:32 +01:00
cmb.h s390/cio: use device_lock during cmb activation 2015-10-14 14:32:02 +02:00
cmpxchg.h s390/cmpxchg: remove dead code 2015-10-14 14:32:15 +02:00
compat.h s390: remove is_32bit_task() helper 2015-11-27 09:24:17 +01:00
cpacf.h s390/crypto: allow to query all known cpacf functions 2016-06-10 12:07:16 +02:00
cpcmd.h
cpu_mf.h s390/cpumf: use basic block for ecctr inline assembly 2016-06-28 09:32:38 +02:00
cpu.h s390/smp: cleanup core vs. cpu in the SCLP interface 2015-06-25 09:39:24 +02:00
cpufeature.h s390/module: enable generic CPU feature modalias using s390 ELF hwcaps 2015-07-22 09:58:02 +02:00
cputime.h
crw.h s390/cio: Consolidate inline assemblies and related data definitions 2015-12-18 14:59:34 +01:00
css_chars.h
ctl_reg.h s390/fpu: always enable the vector facility if it is available 2015-10-14 14:32:08 +02:00
current.h
debug.h
delay.h
device.h s390/dma: Allow per device dma ops 2016-03-02 17:01:56 +02:00
diag.h - ARM: GICv3 ITS emulation and various fixes. Removal of the old 2016-08-02 16:11:27 -04:00
dis.h
div64.h
dma-mapping.h dma-mapping: use unsigned long for dma_attrs 2016-08-04 08:50:07 -04:00
dma.h
eadm.h
ebcdic.h
elf.h s390: Define AT_VECTOR_SIZE_ARCH for ARCH_DLINFO 2016-07-31 09:28:09 -04:00
emergency-restart.h
exec.h
extmem.h
facilities_src.h s390/facilities: add z13 als bit 2015-12-18 14:59:24 +01:00
facility.h s390/facilities: optimize test_facility() 2015-12-18 14:59:23 +01:00
fb.h
fcx.h s390: use canonical include guard style 2016-06-13 15:58:17 +02:00
ftrace.h s390/dumpstack: implement and use return_address() 2016-05-04 16:29:45 +02:00
futex.h
gmap.h KVM: s390: backup the currently enabled gmap when scheduled out 2016-06-20 09:55:24 +02:00
hardirq.h
hugetlb.h s390/mm: add support for 2GB hugepages 2016-07-06 08:46:43 +02:00
hw_irq.h
idals.h
idle.h s390/udelay: make udelay have busy loop semantics 2015-10-14 14:32:13 +02:00
io.h s390/io: Add pci_iomap_wc() and pci_iomap_wc_range() 2015-08-28 08:04:48 +02:00
ipl.h s390/ipl: rename diagnose enums 2016-06-13 15:58:26 +02:00
irq_regs.h
irq.h s390: use SPARSE_IRQ 2016-06-13 15:58:24 +02:00
irqflags.h s390/irqflags: optimize irq restore 2016-01-19 12:14:01 +01:00
isc.h
itcw.h
jump_label.h s390: add explicit <linux/stringify.h> for jump label 2016-06-13 15:58:16 +02:00
Kbuild Merge branch 'strscpy' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile 2015-10-04 16:31:13 +01:00
kdebug.h
kexec.h
kmap_types.h
kprobes.h s390: stack address vs thread_info 2016-06-28 09:33:00 +02:00
kvm_host.h - ARM: GICv3 ITS emulation and various fixes. Removal of the old 2016-08-02 16:11:27 -04:00
kvm_para.h s390/diag: add a statistic for diagnose calls 2015-10-14 14:32:06 +02:00
linkage.h s390/kernel: move EX_TABLE macros to linkage.h header file 2015-07-22 09:57:59 +02:00
livepatch.h livepatch: reuse module loader code to write relocations 2016-04-01 15:00:11 +02:00
local64.h
local.h
lowcore.h s390: rename struct _lowcore to struct lowcore 2016-01-11 12:27:15 +01:00
mman.h
mmu_context.h - ARM: GICv3 ITS emulation and various fixes. Removal of the old 2016-08-02 16:11:27 -04:00
mmu.h - ARM: GICv3 ITS emulation and various fixes. Removal of the old 2016-08-02 16:11:27 -04:00
mmzone.h s390/numa: add core infrastructure 2015-08-03 18:40:25 +02:00
module.h
mutex.h
nmi.h s390/nmi: remove casts 2015-10-27 09:33:55 +01:00
numa.h s390/numa: use correct type for node_to_cpumask_map 2015-09-23 09:18:56 +02:00
os_info.h s390/dump: streamline oldmem copy functions 2015-11-27 09:24:12 +01:00
page.h - ARM: GICv3 ITS emulation and various fixes. Removal of the old 2016-08-02 16:11:27 -04:00
pci_clp.h s390/pci: add ioctl interface for CLP 2016-03-07 16:54:32 +01:00
pci_debug.h
pci_dma.h s390/pci_dma: fix DMA table corruption with > 4 TB main memory 2015-11-27 09:24:15 +01:00
pci_insn.h
pci_io.h s390/pci: improve ZPCI_* macros 2016-01-26 12:45:49 +01:00
pci.h s390/pci: fmb enhancements 2016-04-15 18:16:40 +02:00
percpu.h s390/percpu: remove this_cpu_cmpxchg_double_4 2016-03-02 06:44:30 -06:00
perf_event.h s390/perf: remove perf_release/reserver_sampling functions 2016-06-28 09:32:25 +02:00
pgalloc.h s390/mm: add shadow gmap support 2016-06-20 09:54:04 +02:00
pgtable.h - ARM: GICv3 ITS emulation and various fixes. Removal of the old 2016-08-02 16:11:27 -04:00
processor.h - ARM: GICv3 ITS emulation and various fixes. Removal of the old 2016-08-02 16:11:27 -04:00
ptrace.h s390: remove all usages of PSW_ADDR_INSN 2016-01-19 12:14:03 +01:00
qdio.h
reset.h s390/dump: rework CPU register dump code 2015-11-27 09:24:14 +01:00
runtime_instr.h
rwsem.h locking/rwsem: Remove rwsem_atomic_add() and rwsem_atomic_update() 2016-06-08 15:16:59 +02:00
schid.h
sclp.h s390/sclp: detect storage-key facility 2016-06-10 12:07:30 +02:00
scsw.h
seccomp.h s390/seccomp: include generic seccomp header file 2016-04-01 17:20:55 +02:00
sections.h s390: add proper __ro_after_init support 2016-06-13 15:58:23 +02:00
segment.h
serial.h
setup.h s390/console: Make preferred console handling more consistent 2016-07-13 10:58:07 +02:00
shmparam.h
signal.h
sigp.h s390/smp: use basic blocks for sigp inline assemblies 2016-06-28 09:32:35 +02:00
smp.h s390/dump: rework CPU register dump code 2015-11-27 09:24:14 +01:00
sparsemem.h
spinlock_types.h
spinlock.h locking/spinlock, arch: Update and fix spin_unlock_wait() implementations 2016-06-14 11:55:15 +02:00
stp.h s390/time: remove ETR support 2016-06-13 15:58:21 +02:00
string.h
switch_to.h s390/fpu: split fpu-internal.h into fpu internals, api, and type headers 2015-10-16 09:41:12 +02:00
syscall.h
sysinfo.h s390/sysinfo: add missing SYSIB 1.2.2 multithreading fields 2016-01-11 12:27:00 +01:00
termios.h
thread_info.h s390: add missing declarations 2016-05-10 13:24:51 +02:00
timex.h s390/time: add leap seconds to initial system time 2016-06-13 15:58:20 +02:00
tlb.h mm/mmu_gather: track page size with mmu gather and force flush if page size change 2016-07-26 16:19:19 -07:00
tlbflush.h s390/mm: fix gmap tlb flush issues 2016-07-13 10:58:01 +02:00
topology.h s390/topology: add drawer scheduling domain level 2016-06-13 15:58:27 +02:00
types.h
uaccess.h s390/uaccess: fix __put_get_user_asm define 2016-06-28 09:32:27 +02:00
unaligned.h
unistd.h s390: wire up separate socketcalls system calls 2015-09-18 11:16:53 +02:00
uprobes.h
user.h
vdso.h s390/vdso: optimize getcpu system call 2016-01-11 13:01:24 +01:00
vga.h
vtime.h
vtimer.h
vx-insn.h s390/vx: add vector instruction support for older binutils versions 2015-07-22 09:58:01 +02:00
xor.h s390/xor: optimized xor routing using the XC instruction 2016-02-23 08:56:17 +01:00