Skip to content

Commit 5570a91

Browse files
Wei Yongjunlinvjw
authored andcommitted
mwifiex: convert to use le16_add_cpu()
Convert cpu_to_le16(le16_to_cpu(E1) + E2) to use le16_add_cpu(). dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: John W. Linville <linville@tuxdriver.com>
1 parent 2db96c3 commit 5570a91

File tree

1 file changed

+2
-3
lines changed
  • drivers/net/wireless/mwifiex

1 file changed

+2
-3
lines changed

drivers/net/wireless/mwifiex/scan.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -614,9 +614,8 @@ mwifiex_scan_channel_list(struct mwifiex_private *priv,
614614

615615
/* Increment the TLV header length by the size
616616
appended */
617-
chan_tlv_out->header.len =
618-
cpu_to_le16(le16_to_cpu(chan_tlv_out->header.len) +
619-
(sizeof(chan_tlv_out->chan_scan_param)));
617+
le16_add_cpu(&chan_tlv_out->header.len,
618+
sizeof(chan_tlv_out->chan_scan_param));
620619

621620
/*
622621
* The tlv buffer length is set to the number of bytes

0 commit comments

Comments
 (0)