diff options
author | Guo Zhengkui <guozhengkui@vivo.com> | 2021-12-09 14:23:05 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-12-13 15:03:18 +0100 |
commit | a927ae1fba4b0aa51e1fa9b43c4018bbf10d27f6 (patch) | |
tree | 4b633630c6f9cb3130dd073ac183a697f107403c /drivers | |
parent | aa9c2219f989881dffe2dd6ef9b6540858873a5f (diff) | |
download | linux-a927ae1fba4b0aa51e1fa9b43c4018bbf10d27f6.tar.bz2 |
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: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Guo Zhengkui <guozhengkui@vivo.com>
Link: https://lore.kernel.org/r/20211209062441.9856-1-guozhengkui@vivo.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/core/hcd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 4d326ee12c36..9ffc63ae65ac 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -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; |