cdc_ncm: Fix the build warning
Subsystems (5)
PATCH 1/1 cdc_ncm: Fix the build warning
The ndp32->wLength is two bytes long, so replace cpu_to_le32 with cpu_to_le16.
Signed-off-by Alexander Bersenev <[email protected]>
--- drivers/net/usb/cdc_ncm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/usb/cdc_ncm.c +1 -1
@@ -1172,7 +1172,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; }
Signature · 1 line
2.25.1
From: Alexander Bersenev <[email protected]>
Date: Sat, 14 Mar 2020 10:33:24 +0500
Quoted 3 lines
The
ndp32->wLengthis two bytes long, so replacecpu_to_le32withcpu_to_le16.Signed-off-by Alexander Bersenev <[email protected]>
Applied, thank you.