staging: fbtft: differentiate between buffer and data types to fix sparse warning
authorAlfonso Lima Astor <alfonsolimaastor@gmail.com>
Tue, 17 Oct 2017 17:46:29 +0000 (18:46 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Oct 2017 13:58:33 +0000 (15:58 +0200)
commit8d8825b420ffb370b0a57ba764828efd08738ba0
tree45995bda58c79380f8512b5d649fd6e907e41f62
parent4aca3ca4b793e941eea162dc1bfb6df8c12c29a2
staging: fbtft: differentiate between buffer and data types to fix sparse 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>
drivers/staging/fbtft/fbtft-bus.c