Commit d778d258 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

[media] imon: fix sparse warnings

drivers/media/rc/imon.c:1343:44: warning: cast to restricted __be32
drivers/media/rc/imon.c:1343:44: warning: cast to restricted __be32
drivers/media/rc/imon.c:1343:44: warning: cast to restricted __be32
drivers/media/rc/imon.c:1343:44: warning: cast to restricted __be32
drivers/media/rc/imon.c:1343:44: warning: cast to restricted __be32
drivers/media/rc/imon.c:1343:44: warning: cast to restricted __be32
drivers/media/rc/imon.c:1407:36: warning: cast to restricted __be32
drivers/media/rc/imon.c:1407:36: warning: cast to restricted __be32
drivers/media/rc/imon.c:1407:36: warning: cast to restricted __be32
drivers/media/rc/imon.c:1407:36: warning: cast to restricted __be32
drivers/media/rc/imon.c:1407:36: warning: cast to restricted __be32
drivers/media/rc/imon.c:1407:36: warning: cast to restricted __be32
drivers/media/rc/imon.c:1512:28: warning: cast to restricted __be64
drivers/media/rc/imon.c:1512:28: warning: cast to restricted __be64
drivers/media/rc/imon.c:1512:28: warning: cast to restricted __be64
drivers/media/rc/imon.c:1512:28: warning: cast to restricted __be64
drivers/media/rc/imon.c:1512:28: warning: cast to restricted __be64
drivers/media/rc/imon.c:1512:28: warning: cast to restricted __be64
drivers/media/rc/imon.c:1512:28: warning: cast to restricted __be64
drivers/media/rc/imon.c:1512:28: warning: cast to restricted __be64
drivers/media/rc/imon.c:1512:28: warning: cast to restricted __be64
drivers/media/rc/imon.c:1512:28: warning: cast to restricted __be64
drivers/media/rc/imon.c:1516:28: warning: cast to restricted __be32
drivers/media/rc/imon.c:1516:28: warning: cast to restricted __be32
drivers/media/rc/imon.c:1516:28: warning: cast to restricted __be32
drivers/media/rc/imon.c:1516:28: warning: cast to restricted __be32
drivers/media/rc/imon.c:1516:28: warning: cast to restricted __be32
drivers/media/rc/imon.c:1516:28: warning: cast to restricted __be32
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent e73c7bfe
...@@ -1438,7 +1438,7 @@ static void imon_pad_to_keys(struct imon_context *ictx, unsigned char *buf) ...@@ -1438,7 +1438,7 @@ static void imon_pad_to_keys(struct imon_context *ictx, unsigned char *buf)
} }
buf[2] = dir & 0xFF; buf[2] = dir & 0xFF;
buf[3] = (dir >> 8) & 0xFF; buf[3] = (dir >> 8) & 0xFF;
scancode = be32_to_cpu(*((u32 *)buf)); scancode = be32_to_cpu(*((__be32 *)buf));
} }
} else { } else {
/* /*
...@@ -1502,7 +1502,7 @@ static void imon_pad_to_keys(struct imon_context *ictx, unsigned char *buf) ...@@ -1502,7 +1502,7 @@ static void imon_pad_to_keys(struct imon_context *ictx, unsigned char *buf)
} }
buf[2] = dir & 0xFF; buf[2] = dir & 0xFF;
buf[3] = (dir >> 8) & 0xFF; buf[3] = (dir >> 8) & 0xFF;
scancode = be32_to_cpu(*((u32 *)buf)); scancode = be32_to_cpu(*((__be32 *)buf));
} else { } else {
/* /*
* Hack alert: instead of using keycodes, we have * Hack alert: instead of using keycodes, we have
...@@ -1607,12 +1607,12 @@ static void imon_incoming_packet(struct imon_context *ictx, ...@@ -1607,12 +1607,12 @@ static void imon_incoming_packet(struct imon_context *ictx,
/* Figure out what key was pressed */ /* Figure out what key was pressed */
if (len == 8 && buf[7] == 0xee) { if (len == 8 && buf[7] == 0xee) {
scancode = be64_to_cpu(*((u64 *)buf)); scancode = be64_to_cpu(*((__be64 *)buf));
ktype = IMON_KEY_PANEL; ktype = IMON_KEY_PANEL;
kc = imon_panel_key_lookup(ictx, scancode); kc = imon_panel_key_lookup(ictx, scancode);
ictx->release_code = false; ictx->release_code = false;
} else { } else {
scancode = be32_to_cpu(*((u32 *)buf)); scancode = be32_to_cpu(*((__be32 *)buf));
if (ictx->rc_type == RC_BIT_RC6_MCE) { if (ictx->rc_type == RC_BIT_RC6_MCE) {
ktype = IMON_KEY_IMON; ktype = IMON_KEY_IMON;
if (buf[0] == 0x80) if (buf[0] == 0x80)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment