UPSTREAM: cdc_ncm: Fix the build warning

[ Upstream commit 5d0ab06b63fc9c727a7bb72c81321c0114be540b ]

The ndp32->wLength is two bytes long, so replace cpu_to_le32 with cpu_to_le16.

Fixes: 0fa81b304a79 ("cdc_ncm: Implement the 32-bit version of NCM Transfer Block")
Signed-off-by: Alexander Bersenev <bay@hackerdom.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Bug: 281604646
Bug: 281606231
Change-Id: I333ba662c27baffd30659429d160dab7e96b6f26
Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
This commit is contained in:
Alexander Bersenev
2020-03-14 10:33:24 +05:00
committed by Treehugger Robot
parent d185d91dae
commit 16a60908d9

View File

@@ -1175,7 +1175,7 @@ static struct usb_cdc_ncm_ndp32 *cdc_ncm_ndp32(struct cdc_ncm_ctx *ctx, struct s
ndp32 = ctx->delayed_ndp32; ndp32 = ctx->delayed_ndp32;
ndp32->dwSignature = sign; ndp32->dwSignature = sign;
ndp32->wLength = cpu_to_le32(sizeof(struct usb_cdc_ncm_ndp32) + sizeof(struct usb_cdc_ncm_dpe32)); ndp32->wLength = cpu_to_le16(sizeof(struct usb_cdc_ncm_ndp32) + sizeof(struct usb_cdc_ncm_dpe32));
return ndp32; return ndp32;
} }