linux/drivers/video/fbdev
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
..
aty PCI: Remove includes of asm/pci-bridge.h 2016-02-05 16:29:28 -06:00
core fbmon: remove unused function argument 2016-07-26 16:19:19 -07:00
exynos video: exynos: fix modular build 2016-02-29 18:56:03 +02:00
geode video: constify geode ops structures 2015-12-15 15:41:22 +02:00
i810
intelfb video: Use bool instead int pointer for get_opt_bool() argument 2016-02-16 15:09:20 +02:00
kyro
matrox PCI: Remove includes of asm/pci-bridge.h 2016-02-05 16:29:28 -06:00
mb862xx
mbx
mmp fbdev: mmp: print IRQ resource using %pR format string 2016-01-29 13:42:58 +02:00
nvidia
omap This is the bulk of GPIO changes for kernel v4.6: 2016-03-17 21:05:32 -07:00
omap2 dma-mapping: use unsigned long for dma_attrs 2016-08-04 08:50:07 -04:00
riva video: fbdev: rivafb: unlock chip before probiding EDID 2015-12-15 15:41:23 +02:00
savage
sis video: fbdev: sis: remove unused variable 2016-03-03 13:38:29 +02:00
vermilion mm, page_alloc: distinguish between being unable to sleep, unwilling to sleep and avoiding waking kswapd 2015-11-06 17:50:42 -08:00
via fbdev: Use IS_ENABLED() instead of checking for built-in or module 2016-05-13 15:14:38 +03:00
68328fb.c
acornfb.c dma, mm/pat: Rename dma_*_writecombine() to dma_*_wc() 2016-03-09 14:57:51 +01:00
acornfb.h
amba-clcd-versatile.c dma, mm/pat: Rename dma_*_writecombine() to dma_*_wc() 2016-03-09 14:57:51 +01:00
amba-clcd.c fbdev changes for 4.7 2016-05-20 11:01:02 -07:00
amifb.c
arcfb.c
arkfb.c
asiliantfb.c
atafb_iplan2p2.c
atafb_iplan2p4.c
atafb_iplan2p8.c
atafb_mfb.c
atafb_utils.h
atafb.c fbdev: kill fb_rotate 2016-02-26 13:28:35 +02:00
atafb.h
atmel_lcdfb.c This is the bulk of GPIO changes for kernel v4.6: 2016-03-17 21:05:32 -07:00
au1100fb.c fbdev: kill fb_rotate 2016-02-26 13:28:35 +02:00
au1100fb.h
au1200fb.c
au1200fb.h
auo_k190x.c fbdev: auo_k190x: avoid unused function warnings 2015-12-15 15:41:23 +02:00
auo_k190x.h
auo_k1900fb.c
auo_k1901fb.c
bf54x-lq043fb.c
bf537-lq035.c fbdev: kill fb_rotate 2016-02-26 13:28:35 +02:00
bfin_adv7393fb.c fbdev/bfin_adv7393fb: move DRIVER_NAME before its first use 2016-08-02 19:35:05 -04:00
bfin_adv7393fb.h fbdev/bfin_adv7393fb: move DRIVER_NAME before its first use 2016-08-02 19:35:05 -04:00
bfin-lq035q1-fb.c
bfin-t350mcqb-fb.c
broadsheetfb.c
bt431.h video: fbdev: bt431: Correct cursor format control macro 2016-02-26 13:06:11 +02:00
bt455.h video: fbdev: pmag-ba-fb: Optimize Bt455 colormap addressing 2016-02-26 13:06:11 +02:00
bw2.c
c2p_core.h
c2p_iplan2.c
c2p_planar.c
c2p.h
carminefb_regs.h
carminefb.c
carminefb.h
cg3.c
cg6.c
cg14.c
chipsfb.c
cirrusfb.c
clps711x-fb.c video: clps711x-fb: Changing the compatibility string to match with the smallest supported chip 2016-07-06 17:38:19 +02:00
clps711xfb.c
cobalt_lcdfb.c
controlfb.c
controlfb.h
cyber2000fb.c
cyber2000fb.h
da8xx-fb.c remove lots of IS_ERR_VALUE abuses 2016-05-27 15:26:11 -07:00
dnfb.c
edid.h
efifb.c fbdev changes for 4.7 2016-05-20 11:01:02 -07:00
ep93xx-fb.c dma, mm/pat: Rename dma_*_writecombine() to dma_*_wc() 2016-03-09 14:57:51 +01:00
fb-puv3.c
ffb.c
fm2fb.c
fsl-diu-fb.c video: fbdev: fsl: Fix kernel crash when diu_ops is not implemented 2015-12-09 12:57:06 +02:00
g364fb.c
gbefb.c dma, mm/pat: Rename dma_*_writecombine() to dma_*_wc() 2016-03-09 14:57:51 +01:00
goldfishfb.c
grvga.c
gxt4500.c
hecubafb.c
hgafb.c
hitfb.c
hpfb.c
hyperv_fb.c drivers:hv: Use new vmbus_mmio_free() from client drivers. 2016-04-30 14:01:37 -07:00
i740_reg.h
i740fb.c drivers/video/fbdev/i740fb: remove unused variable 2015-12-15 15:41:21 +02:00
igafb.c
imsttfb.c PCI: Remove includes of asm/pci-bridge.h 2016-02-05 16:29:28 -06:00
imxfb.c video: fbdev: imxfb: add some error handling 2016-05-10 11:42:25 +03:00
jz4740_fb.c
Kconfig fbdev changes for 4.7 2016-05-20 11:01:02 -07:00
leo.c
macfb.c
macmodes.c
macmodes.h
Makefile fbdev: sh_mipi_dsi: remove driver 2016-05-10 11:53:38 +03:00
maxinefb.c
metronomefb.c video: fbdev: metronomefb: two harmless off by one bugs 2016-02-16 14:52:43 +02:00
mx3fb.c dma, mm/pat: Rename dma_*_writecombine() to dma_*_wc() 2016-03-09 14:57:51 +01:00
mxsfb.c
n411.c fbdev: n411: check return value 2016-02-26 12:16:58 +02:00
neofb.c
nuc900fb.c dma, mm/pat: Rename dma_*_writecombine() to dma_*_wc() 2016-03-09 14:57:51 +01:00
nuc900fb.h
ocfb.c ocfb: fix tgdel and tvdel timing parameters 2016-01-29 13:34:07 +02:00
offb.c PCI: Remove includes of asm/pci-bridge.h 2016-02-05 16:29:28 -06:00
p9100.c
platinumfb.c
platinumfb.h
pm2fb.c
pm3fb.c
pmag-aa-fb.c video: fbdev: pmag-ba-fb: Optimize Bt455 colormap addressing 2016-02-26 13:06:11 +02:00
pmag-ba-fb.c video: fbdev: pmag-ba-fb: Fix the lower margin size 2016-02-26 13:02:58 +02:00
pmagb-b-fb.c
ps3fb.c
pvr2fb.c mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros 2016-04-04 10:41:08 -07:00
pxa3xx-gcu.c
pxa3xx-gcu.h
pxa168fb.c dma, mm/pat: Rename dma_*_writecombine() to dma_*_wc() 2016-03-09 14:57:51 +01:00
pxa168fb.h
pxafb.c dma, mm/pat: Rename dma_*_writecombine() to dma_*_wc() 2016-03-09 14:57:51 +01:00
pxafb.h video: fbdev: pxafb: loosen the platform data bond 2015-12-15 15:41:24 +02:00
q40fb.c
s1d13xxxfb.c
s3c2410fb.c dma, mm/pat: Rename dma_*_writecombine() to dma_*_wc() 2016-03-09 14:57:51 +01:00
s3c2410fb.h
s3c-fb.c dma, mm/pat: Rename dma_*_writecombine() to dma_*_wc() 2016-03-09 14:57:51 +01:00
s3fb.c
sa1100fb.c dma, mm/pat: Rename dma_*_writecombine() to dma_*_wc() 2016-03-09 14:57:51 +01:00
sa1100fb.h
sbuslib.c
sbuslib.h
sh7760fb.c
sh_mobile_lcdcfb.c
sh_mobile_lcdcfb.h
sh_mobile_meram.c
simplefb.c simplefb: Remove impossible check for of_clk_get_parent_count() < 0 2016-02-26 16:01:32 -08:00
skeletonfb.c fbdev: kill fb_rotate 2016-02-26 13:28:35 +02:00
sm501fb.c
sm712.h
sm712fb.c fbdev: sm712fb: avoid unused function warnings 2015-12-15 15:41:23 +02:00
smscufx.c
ssd1307fb.c pwm: Changes for v4.7-rc1 2016-05-25 10:40:15 -07:00
sstfb.c
sticore.h
stifb.c
sunxvr500.c drivers/video: make fbdev/sunxvr500.c explicitly non-modular 2016-03-03 13:36:51 +02:00
sunxvr1000.c drivers/video: make fbdev/sunxvr1000.c explicitly non-modular 2016-03-03 13:36:51 +02:00
sunxvr2500.c drivers/video: make fbdev/sunxvr2500.c explicitly non-modular 2016-03-03 13:36:51 +02:00
tcx.c
tdfxfb.c
tgafb.c
tmiofb.c
tridentfb.c fbdev changes for 4.4 2015-11-10 10:00:09 -08:00
udlfb.c
uvesafb.c
valkyriefb.c
valkyriefb.h
vesafb.c
vfb.c
vga16fb.c
vt8500lcdfb.c
vt8500lcdfb.h
vt8623fb.c
w100fb.c
w100fb.h
wm8505fb_regs.h
wm8505fb.c
wmt_ge_rops.c
wmt_ge_rops.h
xen-fbfront.c
xilinxfb.c