lkml.org 
[lkml]   [2021]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 21/24] usb: host: xhci: Move array of structs from the stack onto the heap
From
Date
On 5/26/21 4:00 PM, Lee Jones wrote:

> Fixes the following W=1 kernel build warning(s):
>
> drivers/usb/host/xhci.c: In function ‘xhci_reserve_bandwidth’:
> drivers/usb/host/xhci.c:2859:1: warning: the frame size of 1032 bytes is larger than 1024 bytes [-Wframe-larger-than=]
>
> Cc: Mathias Nyman <mathias.nyman@intel.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: linux-usb@vger.kernel.org
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
> drivers/usb/host/xhci.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
> index ac2a7d4288883..40ce4b4eb12ad 100644
> --- a/drivers/usb/host/xhci.c
> +++ b/drivers/usb/host/xhci.c
[...]
> @@ -2788,6 +2788,10 @@ static int xhci_reserve_bandwidth(struct xhci_hcd *xhci,
> return -ENOMEM;
> }
>
> + ep_bw_info = kzalloc(sizeof(*ep_bw_info) * 31, GFP_KERNEL);

Why not kcalloc()?

[...]

MBR, Sergei

\
 
 \ /
  Last update: 2021-05-26 16:22    [W:0.211 / U:2.756 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site