media: ir_toy: assignment to be16 should be of correct type

Message ID 20211013113253.24707-1-sean@mess.org (mailing list archive)
State Accepted, archived
Delegated to: Sean Young
Headers
Series media: ir_toy: assignment to be16 should be of correct type |

Commit Message

Sean Young Oct. 13, 2021, 11:32 a.m. UTC
  commit f0c15b360fb6 ("media: ir_toy: prevent device from hanging during
transmit") removed a cpu_to_be16() cast, which causes a sparse warning.

Fixes: f0c15b360fb6 ("media: ir_toy: prevent device from hanging during transmit")

Reported-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Sean Young <sean@mess.org>
---
 drivers/media/rc/ir_toy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/drivers/media/rc/ir_toy.c b/drivers/media/rc/ir_toy.c
index 71aced52248f..7e98e7e3aace 100644
--- a/drivers/media/rc/ir_toy.c
+++ b/drivers/media/rc/ir_toy.c
@@ -318,7 +318,7 @@  static int irtoy_tx(struct rc_dev *rc, uint *txbuf, uint count)
 		buf[i] = cpu_to_be16(v);
 	}
 
-	buf[count] = 0xffff;
+	buf[count] = cpu_to_be16(0xffff);
 
 	irtoy->tx_buf = buf;
 	irtoy->tx_len = size;