Commit a927ae1f authored by Guo Zhengkui's avatar Guo Zhengkui Committed by Greg Kroah-Hartman

usb: core: hcd: change sizeof(vaddr) to sizeof(unsigned long)

`vaddr` is a pointer to unsigned char. sizeof(vaddr) here intends
to get the size of a pointer. But readers may get confused. Change
sizeof(vaddr) to sizeof(unsigned long) makes more sense.
Suggested-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGuo Zhengkui <guozhengkui@vivo.com>
Link: https://lore.kernel.org/r/20211209062441.9856-1-guozhengkui@vivo.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent aa9c2219
......@@ -1281,7 +1281,7 @@ static int hcd_alloc_coherent(struct usb_bus *bus,
return -EFAULT;
}
vaddr = hcd_buffer_alloc(bus, size + sizeof(vaddr),
vaddr = hcd_buffer_alloc(bus, size + sizeof(unsigned long),
mem_flags, dma_handle);
if (!vaddr)
return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment