summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Bersenev <bay@hackerdom.ru>2020-03-14 10:33:24 +0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-06-09 10:22:55 +0200
commit47473722d2754621cf8588db0cd3d4720e66d206 (patch)
treefb5eb8d8b4cbe7d4bc86a6ba33f617ce9839e1a5
parent8cf7db86a8984ffa3a3388a8df12bc0aa4c79bd7 (diff)
cdc_ncm: Fix the build warning
commit 5d0ab06b63fc9c727a7bb72c81321c0114be540b upstream. 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: Tudor Ambarus <tudor.ambarus@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/net/usb/cdc_ncm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
index b2721b79b2ef..b8585fb555fb 100644
--- a/drivers/net/usb/cdc_ncm.c
+++ b/drivers/net/usb/cdc_ncm.c
@@ -1176,7 +1176,7 @@ static struct usb_cdc_ncm_ndp32 *cdc_ncm_ndp32(struct cdc_ncm_ctx *ctx, struct s
ndp32 = ctx->delayed_ndp32;
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;
}