From: Kulikov Vasiliy Date: Mon, 28 Jun 2010 11:55:46 +0000 (+0400) Subject: USB: xhci: trivial: use ARRAY_SIZE X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e10fa4787f1fb9c8738dff955c272f30b7b63134;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git USB: xhci: trivial: use ARRAY_SIZE Change sizeof(x) / sizeof(*x) to ARRAY_SIZE(x). Signed-off-by: Kulikov Vasiliy Cc: Sarah Sharp Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index 2eb658d26394..6d8f7e32932a 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c @@ -1588,7 +1588,7 @@ static int xhci_check_trb_in_td_math(struct xhci_hcd *xhci, gfp_t mem_flags) unsigned int num_tests; int i, ret; - num_tests = sizeof(simple_test_vector) / sizeof(simple_test_vector[0]); + num_tests = ARRAY_SIZE(simple_test_vector); for (i = 0; i < num_tests; i++) { ret = xhci_test_trb_in_td(xhci, xhci->event_ring->first_seg, @@ -1601,7 +1601,7 @@ static int xhci_check_trb_in_td_math(struct xhci_hcd *xhci, gfp_t mem_flags) return ret; } - num_tests = sizeof(complex_test_vector) / sizeof(complex_test_vector[0]); + num_tests = ARRAY_SIZE(complex_test_vector); for (i = 0; i < num_tests; i++) { ret = xhci_test_trb_in_td(xhci, complex_test_vector[i].input_seg,