mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
NFC: port100: Convert cpu_to_le16(le16_to_cpu(E1) + E2) to use le16_add_cpu().
Convert cpu_to_le16(le16_to_cpu(frame->datalen) + len) to use le16_add_cpu(), which is more concise and does the same thing. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Mao Wenan <maowenan@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
4a63ef710c
commit
718eae277e
@@ -565,7 +565,7 @@ static void port100_tx_update_payload_len(void *_frame, int len)
|
|||||||
{
|
{
|
||||||
struct port100_frame *frame = _frame;
|
struct port100_frame *frame = _frame;
|
||||||
|
|
||||||
frame->datalen = cpu_to_le16(le16_to_cpu(frame->datalen) + len);
|
le16_add_cpu(&frame->datalen, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool port100_rx_frame_is_valid(void *_frame)
|
static bool port100_rx_frame_is_valid(void *_frame)
|
||||||
|
Reference in New Issue
Block a user