diff mbox series

[2/2] cdc_ncm: Fix the build warning

Message ID 20200313213823.178435-2-bay@hackerdom.ru
State Mainlined
Commit 5d0ab06b63fc9c727a7bb72c81321c0114be540b
Headers show
Series [1/2] cdc_ncm: Implement the 32-bit version of NCM Transfer Block | expand

Commit Message

Alexander Bersenev March 13, 2020, 9:38 p.m. UTC
The ndp32->wLength is two bytes long, so replace cpu_to_le32 with cpu_to_le16.
---
 drivers/net/usb/cdc_ncm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jakub Kicinski March 14, 2020, 2:26 a.m. UTC | #1
On Sat, 14 Mar 2020 02:38:21 +0500 Alexander Bersenev wrote:
> The ndp32->wLength is two bytes long, so replace cpu_to_le32 with cpu_to_le16.

missing signoff

> diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
> index 5569077bd5b8..8929669b5e6d 100644
> --- a/drivers/net/usb/cdc_ncm.c
> +++ b/drivers/net/usb/cdc_ncm.c
> @@ -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;

Isn't this code added in the previous patch? Why not squash them
together?
diff mbox series

Patch

diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
index 5569077bd5b8..8929669b5e6d 100644
--- a/drivers/net/usb/cdc_ncm.c
+++ b/drivers/net/usb/cdc_ncm.c
@@ -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;
 }