kernel-fxtec-pro1x/arch/ia64/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
..
native ia64: remove paravirt code 2015-06-10 14:26:32 -07:00
sn ia64: Fix misspellings in comments. 2016-04-18 12:45:54 +02:00
uv ia64: Replace __get_cpu_var uses 2014-08-26 13:45:52 -04:00
acenv.h
acpi-ext.h
acpi.h ACPI / NUMA: Move acpi_numa_arch_fixup() to ia64 only 2016-05-30 14:27:07 +02:00
agp.h
asm-offsets.h
asmmacro.h
atomic.h locking/atomic, arch/ia64: Implement atomic{,64}_fetch_{add,sub,and,or,xor}() 2016-06-16 10:48:25 +02:00
barrier.h ia64: define __smp_xxx 2016-01-12 20:46:55 +02:00
bitops.h
bug.h
bugs.h
cache.h
cacheflush.h
checksum.h ipv6: Pass proto to csum_ipv6_magic as __u8 instead of unsigned short 2016-03-13 23:55:13 -04:00
clocksource.h
cpu.h
cputime.h
current.h
cyclone.h
delay.h
device.h
div64.h
dma-mapping.h dma-mapping: always provide the dma_map_ops based implementation 2016-01-20 17:09:18 -08:00
dma.h
dmi.h
early_ioremap.h ia64: split off early_ioremap() declarations into asm/early_ioremap.h 2016-01-13 10:35:14 -08:00
elf.h
emergency-restart.h
esi.h
fb.h
fpswa.h
ftrace.h
futex.h
gcc_intrin.h
hardirq.h
hpsim.h
hugetlb.h mm/hugetlb: remove arch_prepare/release_hugepage from arch headers 2015-06-25 17:00:35 -07:00
hw_irq.h ia64: remove paravirt code 2015-06-10 14:26:32 -07:00
idle.h
intrinsics.h ia64: remove paravirt code 2015-06-10 14:26:32 -07:00
io.h ia64: define ioremap_uc() 2016-03-17 15:09:34 -07:00
iommu.h x86/cpufeature: Remove cpu_has_x2apic 2016-03-31 13:35:08 +02:00
iommu_table.h
iosapic.h ia64: remove paravirt code 2015-06-10 14:26:32 -07:00
irq.h
irq_regs.h
irq_remapping.h iommu/vt-d: Refine the interfaces to create IRQ for DMAR unit 2015-04-24 15:36:49 +02:00
irqflags.h
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
kregs.h
libata-portmap.h
linkage.h
local.h
local64.h
machvec.h dma-mapping: use unsigned long for dma_attrs 2016-08-04 08:50:07 -04:00
machvec_dig.h
machvec_dig_vtd.h
machvec_hpsim.h
machvec_hpzx1.h
machvec_hpzx1_swiotlb.h
machvec_init.h
machvec_sn2.h
machvec_uv.h
mc146818rtc.h
mca.h
mca_asm.h
meminit.h
mman.h
mmu.h
mmu_context.h
mmzone.h
module.h ia64: remove paravirt code 2015-06-10 14:26:32 -07:00
msidef.h
mutex.h locking/mutex: Optimize mutex_trylock() fast-path 2016-06-08 15:17:01 +02:00
nodedata.h
numa.h
page.h libnvdimm, pfn, pmem: allocate memmap array in persistent memory 2016-01-15 17:56:32 -08:00
pal.h
param.h
parport.h
patch.h
pci.h PCI: Move pci_dma_* helpers to common code 2016-03-07 10:40:02 -06:00
percpu.h percpu: remove PERCPU_ENOUGH_ROOM which is stale definition 2015-11-16 10:50:25 -05:00
perfmon.h
pgalloc.h ia64: expose number of page table levels on Kconfig level 2015-04-14 16:49:02 -07:00
pgtable.h ia64: expose number of page table levels on Kconfig level 2015-04-14 16:49:02 -07:00
processor.h sched, mips, ia64: Remove __ARCH_WANT_UNLOCKED_CTXSW 2014-09-24 14:47:05 +02:00
ptrace.h
rwsem.h locking/rwsem: Remove rwsem_atomic_add() and rwsem_atomic_update() 2016-06-08 15:16:59 +02:00
sal.h
sections.h ia64: remove duplicate declarations of __per_cpu_start[] and __per_cpu_end[] 2014-10-14 02:18:28 +02:00
segment.h
serial.h
shmparam.h
siginfo.h
signal.h
smp.h
sparsemem.h
spinlock.h locking/spinlock, arch: Update and fix spin_unlock_wait() implementations 2016-06-14 11:55:15 +02:00
spinlock_types.h
string.h
swiotlb.h
switch_to.h ia64: Replace __get_cpu_var uses 2014-08-26 13:45:52 -04:00
syscall.h ARCH: AUDIT: implement syscall_get_arch for all arches 2014-09-23 16:20:10 -04:00
termios.h
thread_info.h signal: consolidate {TS,TLF}_RESTORE_SIGMASK code 2016-08-02 19:35:23 -04:00
timex.h
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
topology.h sched/topology: Rename topology_thread_cpumask() to topology_sibling_cpumask() 2015-05-27 15:22:15 +02:00
types.h
uaccess.h ia64/extable: use generic search and sort routines 2016-03-22 15:36:02 -07:00
unaligned.h
uncached.h
unistd.h [IA64] Enable preadv2 and pwritev2 syscalls for ia64 2016-03-25 14:37:32 -07:00
unwind.h
user.h
ustack.h
vga.h
xor.h