drm/panel: declare variable as __be16
Subsystems (3)
PATCH 1/1 drm/panel: declare variable as __be16
Declare the temp variable as __be16 to address the following sparse
warning:drivers/gpu/drm/panel/panel-lg-lg4573.c:45:20: warning: incorrect type in initializer (different base types)drivers/gpu/drm/panel/panel-lg-lg4573.c:45:20: expected unsigned short [unsigned] [usertype] tempdrivers/gpu/drm/panel/panel-lg-lg4573.c:45:20: got restricted __be16 [usertype] <noident>
--- drivers/gpu/drm/panel/panel-lg-lg4573.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/panel/panel-lg-lg4573.c +1 -1
@@ -42,7 +42,7 @@ static int lg4573_spi_write_u16(struct lg4573 *ctx, u16 data)struct spi_transfer xfer = { .len =2 , }; -u16 temp =cpu_to_be16 (data); +__be16 temp =cpu_to_be16 (data);struct spi_message msg;dev_dbg (ctx->panel.dev,"writing data: %x\n" , data);
Signature · 1 line
2.17.1
Daniel Vetter
AppliedQuoted 7 lines · Wambui Karuga
Declare the temp variable as
__be16to address the following sparse
warning:drivers/gpu/drm/panel/panel-lg-lg4573.c:45:20: warning: incorrect type in initializer (different base types)drivers/gpu/drm/panel/panel-lg-lg4573.c:45:20: expected unsigned short [unsigned] [usertype] tempdrivers/gpu/drm/panel/panel-lg-lg4573.c:45:20: got restricted__be16[usertype] <noident>Signed-off-by Wambui Karuga <[email protected]>
Applied to drm-misc-next, thanks for your patch!
-Daniel
Quoted 20 lines
--- drivers/gpu/drm/panel/panel-lg-lg4573.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/panel/panel-lg-lg4573.c +1
-1@@ -42,7 +42,7 @@ static int lg4573_spi_write_u16(struct lg4573 *ctx, u16 data)struct spi_transfer xfer = { .len =2 , }; -u16 temp =cpu_to_be16 (data); +__be16 temp =cpu_to_be16 (data);struct spi_message msg;dev_dbg (ctx->panel.dev,"writing data: %x\n" , data);Signature · 1 line
2.17.1
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel