提交 ae977e38 编写于 作者: S Sean Young 提交者: Zheng Zengkai

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

stable inclusion
from stable-5.10.80
commit 7c1c7ac9d13addf1fbe27c86d2838ebeb0e3b0be
bugzilla: 185821 https://gitee.com/openeuler/kernel/issues/I4L7CG

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=7c1c7ac9d13addf1fbe27c86d2838ebeb0e3b0be

--------------------------------

[ Upstream commit febfe985 ]

commit f0c15b36 ("media: ir_toy: prevent device from hanging during
transmit") removed a cpu_to_be16() cast, which causes a sparse warning.

Fixes: f0c15b36 ("media: ir_toy: prevent device from hanging during transmit")
Reported-by: NHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: NSean Young <sean@mess.org>
Signed-off-by: NMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Reviewed-by: NWeilong Chen <chenweilong@huawei.com>
Acked-by: NWeilong Chen <chenweilong@huawei.com>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 b7de51b0
...@@ -310,7 +310,7 @@ static int irtoy_tx(struct rc_dev *rc, uint *txbuf, uint count) ...@@ -310,7 +310,7 @@ static int irtoy_tx(struct rc_dev *rc, uint *txbuf, uint count)
buf[i] = cpu_to_be16(v); buf[i] = cpu_to_be16(v);
} }
buf[count] = 0xffff; buf[count] = cpu_to_be16(0xffff);
irtoy->tx_buf = buf; irtoy->tx_buf = buf;
irtoy->tx_len = size; irtoy->tx_len = size;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册