alistair23-linux/drivers/gpu/drm/nouveau
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
..
dispnv04 drm/nouveau/dispnv04: Use helper to turn off CRTC 2016-06-24 08:49:38 +02:00
include drm/nouveau/bus: remove cpu_coherent flag 2016-07-14 11:55:18 +10:00
nvif drm/nouveau/nvif: device time mthd 2015-08-28 12:40:33 +10:00
nvkm dma-mapping: use unsigned long for dma_attrs 2016-08-04 08:50:07 -04:00
Kbuild drm/nouveau/sysfs: remove pstate interface 2016-01-11 11:28:26 +10:00
Kconfig drm/nouveau: make fbdev support really optional 2016-07-15 10:28:40 -04:00
nouveau_abi16.c drm/nouveau/core: recognise GP100 chipset 2016-07-14 11:53:25 +10:00
nouveau_abi16.h drm/nouveau/abi16: implement limited interoperability with usif/nvif 2015-11-03 15:02:18 +10:00
nouveau_acpi.c drm/nouveau/acpi: fix lockup with PCIe runtime PM 2016-07-30 18:19:48 +10:00
nouveau_acpi.h drm/nouveau/device: remove pci/platform_device from common struct 2015-08-28 12:40:49 +10:00
nouveau_backlight.c drm/nouveau: rename nouveau_drm.h to nouveau_drv.h 2016-05-20 14:43:04 +10:00
nouveau_bios.c drm/nouveau: rename nouveau_drm.h to nouveau_drv.h 2016-05-20 14:43:04 +10:00
nouveau_bios.h
nouveau_bo.c Merge branch 'linux-4.8' of git://github.com/skeggsb/linux into drm-next 2016-07-14 12:14:49 +10:00
nouveau_bo.h drm/nouveau: finalise nvkm namespace switch (no binary change) 2015-01-22 12:18:07 +10:00
nouveau_chan.c drm/nouveau/fifo/gp100: initial support 2016-07-14 11:53:25 +10:00
nouveau_chan.h drm/nouveau: remove unnecessary usage of object handles 2015-11-03 15:02:18 +10:00
nouveau_connector.c drm/nouveau: rename nouveau_drm.h to nouveau_drv.h 2016-05-20 14:43:04 +10:00
nouveau_connector.h drm/nouveau: finalise nvkm namespace switch (no binary change) 2015-01-22 12:18:07 +10:00
nouveau_crtc.h drm/nouveau: Use private save/restore hooks for CRTCs 2015-12-08 16:13:49 +01:00
nouveau_debugfs.c drm/nouveau: rename nouveau_drm.h to nouveau_drv.h 2016-05-20 14:43:04 +10:00
nouveau_debugfs.h drm/nouveau: rename nouveau_drm.h to nouveau_drv.h 2016-05-20 14:43:04 +10:00
nouveau_display.c Merge tag 'topic/drm-misc-2016-07-14' of git://anongit.freedesktop.org/drm-intel into drm-next 2016-07-15 11:01:37 +10:00
nouveau_display.h drm/nouveau: replace legacy vblank helpers 2016-06-13 18:33:41 +02:00
nouveau_dma.c drm/nouveau: rename nouveau_drm.h to nouveau_drv.h 2016-05-20 14:43:04 +10:00
nouveau_dma.h drm/nouveau/nvif: simplify and tidy library interfaces 2015-08-28 12:40:32 +10:00
nouveau_dp.c drm/nouveau: rename nouveau_drm.h to nouveau_drv.h 2016-05-20 14:43:04 +10:00
nouveau_drm.c Merge tag 'topic/drm-misc-2016-07-14' of git://anongit.freedesktop.org/drm-intel into drm-next 2016-07-15 11:01:37 +10:00
nouveau_drv.h drm/nouveau: rename nouveau_drm.h to nouveau_drv.h 2016-05-20 14:43:04 +10:00
nouveau_encoder.h drm: Constify drm_encoder_slave_funcs 2015-12-15 13:41:17 +01:00
nouveau_fbcon.c drm/nouveau: fix for disabled fbdev emulation 2016-06-24 07:51:32 +10:00
nouveau_fbcon.h drm: Remove unused fbdev_list members 2015-11-24 11:41:52 +01:00
nouveau_fence.c drm/nouveau: rename nouveau_drm.h to nouveau_drv.h 2016-05-20 14:43:04 +10:00
nouveau_fence.h dma-buf/fence: make fence context 64 bit v2 2016-06-02 08:27:41 +02:00
nouveau_gem.c Merge branch 'linux-4.7' of git://github.com/skeggsb/linux into drm-next 2016-05-21 06:12:13 +10:00
nouveau_gem.h drm/nouveau: rename nouveau_drm.h to nouveau_drv.h 2016-05-20 14:43:04 +10:00
nouveau_hwmon.c drm/nouveau/hwmon: add in_min and in_max 2016-07-14 11:53:25 +10:00
nouveau_hwmon.h
nouveau_ioc32.c drm: Remove DRM_ARRAY_SIZE() for ARRAY_SIZE() 2014-06-10 09:36:17 +10:00
nouveau_ioctl.h
nouveau_nvif.c drm/nouveau: rename nouveau_drm.h to nouveau_drv.h 2016-05-20 14:43:04 +10:00
nouveau_platform.c drm/nouveau/tegra: acquire and enable reference clock if needed 2016-04-06 16:06:51 +10:00
nouveau_platform.h drm/nouveau: rename nouveau_drm.h to nouveau_drv.h 2016-05-20 14:43:04 +10:00
nouveau_prime.c drm/nouveau: rename nouveau_drm.h to nouveau_drv.h 2016-05-20 14:43:04 +10:00
nouveau_reg.h drm/nouveau/sw: rename from software (no binary change) 2015-01-22 12:17:47 +10:00
nouveau_sgdma.c drm/nouveau: rename nouveau_drm.h to nouveau_drv.h 2016-05-20 14:43:04 +10:00
nouveau_ttm.c drm/nouveau/core: recognise GP100 chipset 2016-07-14 11:53:25 +10:00
nouveau_ttm.h
nouveau_usif.c drm/fence: add fence to drm_pending_event 2016-06-03 00:01:59 +02:00
nouveau_usif.h drm/nouveau: expose the full object/event interfaces to userspace 2014-08-10 05:28:18 +10:00
nouveau_vga.c drm/nouveau: rename nouveau_drm.h to nouveau_drv.h 2016-05-20 14:43:04 +10:00
nouveau_vga.h
nv04_fbcon.c drm/nouveau/fbcon: fix font width not divisible by 8 2016-07-30 18:17:22 +10:00
nv04_fence.c drm/nouveau: rename nouveau_drm.h to nouveau_drv.h 2016-05-20 14:43:04 +10:00
nv10_fence.c drm/nouveau: rename nouveau_drm.h to nouveau_drv.h 2016-05-20 14:43:04 +10:00
nv10_fence.h drm/nouveau: remove as much direct use of core headers as possible 2014-08-10 05:13:16 +10:00
nv17_fence.c drm/nouveau: rename nouveau_drm.h to nouveau_drv.h 2016-05-20 14:43:04 +10:00
nv50_display.c drm/nouveau/disp/gp104: initial support 2016-07-14 11:53:25 +10:00
nv50_display.h
nv50_fbcon.c drm/nouveau/fbcon: fix font width not divisible by 8 2016-07-30 18:17:22 +10:00
nv50_fence.c drm/nouveau: rename nouveau_drm.h to nouveau_drv.h 2016-05-20 14:43:04 +10:00
nv84_fence.c drm/nouveau: rename nouveau_drm.h to nouveau_drv.h 2016-05-20 14:43:04 +10:00
nvc0_fbcon.c drm/nouveau/fbcon: fix font width not divisible by 8 2016-07-30 18:17:22 +10:00
nvc0_fence.c drm/nouveau: rename nouveau_drm.h to nouveau_drv.h 2016-05-20 14:43:04 +10:00