summaryrefslogtreecommitdiff
path: root/drivers/staging/fbtft/fbtft-bus.c
AgeCommit message (Collapse)AuthorFilesLines
2017-10-18staging: fbtft: differentiate between buffer and data types to fix sparse ↵Alfonso Lima Astor1-12/+12
warning sparse was complaning about an incorrect type cast: drivers/staging/fbtft/fbtft-bus.c:60:1: warning: incorrect type in assignment (different base types) drivers/staging/fbtft/fbtft-bus.c:60:1: expected unsigned short [unsigned] [short] [usertype] <noident> drivers/staging/fbtft/fbtft-bus.c:60:1: got restricted __be16 [usertype] <noident> drivers/staging/fbtft/fbtft-bus.c:60:1: warning: incorrect type in assignment (different base types) drivers/staging/fbtft/fbtft-bus.c:60:1: expected unsigned short [unsigned] [short] [usertype] <noident> drivers/staging/fbtft/fbtft-bus.c:60:1: got restricted __be16 [usertype] <noident> The solution is to add an extra parameter to the macro to differentiate between buffer type and data type. Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Alfonso Lima Astor <alfonsolimaastor@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08staging: fbtft: fix type assignment warningAlex Wilson1-1/+1
Sparse spits out a warning that a __be16 was being assigned to a u16. Change the type of txbuf16 to __be16 b/c it's a restricted type and prevents mixing endianness. Signed-off-by: Alex Wilson <alex.david.wilson@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09staging: fbtft: use helper fbtft_write_buf_dc in fbtft-bus.cHeiner Kallweit1-23/+8
Make use of new helper fbtft_write_buf_dc. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-01staging: fbtft: fbtft-bus: Fix checkpatch warningAnson Jacob1-1/+2
Fix checkpatch.pl warning: Block comments use * on subsequent lines Block comments use a trailing */ on a separate line Signed-off-by: Anson Jacob <ansonjacob.aj@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-12staging: fbtft: fbtft-bus.c: Drop unneeded void pointer castJanani Ravichandran1-2/+2
Remove unneeded cast on the void pointer par->txbuf.buf . Semantic patch used: @r@ expression x; void* e; type T; identifier f; @@ ( *((T *)e) | ((T *)x) [...] | ((T *)x)->f | - (T *) e ) Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-12staging: fbtft: replace ternary operator with min macroAlison Schofield1-2/+2
Use macro min() to get the minimum of two values for brevity and readability. Found using Coccinelle: @@ type T; T x; T y; @@ ( - x < y ? x : y + min(x,y) | - x > y ? x : y + max(x,y) ) Signed-off-by: Alison Schofield <amsfield22@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-13staging: fbtft: access screen buffer directlyLars Svensson1-4/+4
In fbtft-bus.c:fbtft_write_vmem16_bus9(), ioread8() is used for accessing the provided screen array. Since screen_buffer actually points to an ordinary buffer, instead access it directly. Signed-off-by: Lars Svensson <lars1.svensson@sonymobile.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-13staging: fbtft: use alternate screen pointerLars Svensson1-3/+3
Member screen_base in struct fb_info is declared with __iomem qualifier causing sparse warnings when used as a regular ponter. To avoid the warnings, instead use alternate non-__iomem pointer, screen_buffer, troughout the driver. Signed-off-by: Lars Svensson <lars1.svensson@sonymobile.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-13staging/fbtft : Add missing whitespace around operatorsAnish Bhatt1-3/+4
Add blank spaces around operators where recommended by checkpatch.pl Signed-off-by: Anish Bhatt <anish@chelsio.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-13staging/fbtft : Fix multiple/missing blank line issuesAnish Bhatt1-6/+0
Remove or add blank lines as recommended by checkpatch.pl Signed-off-by: Anish Bhatt <anish@chelsio.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08drivers: staging: fbtft: fbtft-bus.c: Fix different address space warning on ↵Tolga Ceylan1-4/+4
I/O mem To fix sparse warning of incorrect type in assignment (different address space), added annotation __iomem to vmem8 and modified direct reads with ioread8(). Signed-off-by: Tolga Ceylan <tolga.ceylan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-07Staging: fbtft: clean dev_err() loggingHaneen Mohammed1-1/+1
This patch removes __func__ from dev_err. dev_err includes information about: (devcice, driver, specific instance of device, etc) in the log printout. This was done using Coccinelle, with the following semantic patch: @a@ expression E, R; expression msg; @@ dev_err(E, msg, __func__, R); @script:python b@ e << a.msg; y; @@ if(e.find("%s: ") == True): m = e.replace("%s: ", "", 1); coccinelle.y = m; elif(e.find("%s ") == True): m = e.replace("%s ", "", 1); coccinelle.y = m; elif(e.find("%s:") == True): m = e.replace("%s:", "", 1); coccinelle.y = m; else: m = e.replace("%s", "",1); coccinelle.y = m; @c@ expression a.E, a.msg, a.R; identifier b.y; @@ - dev_err(E, msg, __func__, R); + dev_err(E, y, R); Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-18staging: fbtft: core supportThomas Petazzoni1-0/+256
This commit adds the core fbtft framework from https://github.com/notro/fbtft. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Noralf Tronnes <notro@tronnes.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>