Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e10fa478 authored by Kulikov Vasiliy's avatar Kulikov Vasiliy Committed by Greg Kroah-Hartman
Browse files

USB: xhci: trivial: use ARRAY_SIZE



Change sizeof(x) / sizeof(*x) to ARRAY_SIZE(x).

Signed-off-by: default avatarKulikov Vasiliy <segooon@gmail.com>
Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent f9ff70c2
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -1588,7 +1588,7 @@ static int xhci_check_trb_in_td_math(struct xhci_hcd *xhci, gfp_t mem_flags)
	unsigned int num_tests;
	unsigned int num_tests;
	int i, ret;
	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++) {
	for (i = 0; i < num_tests; i++) {
		ret = xhci_test_trb_in_td(xhci,
		ret = xhci_test_trb_in_td(xhci,
				xhci->event_ring->first_seg,
				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;
			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++) {
	for (i = 0; i < num_tests; i++) {
		ret = xhci_test_trb_in_td(xhci,
		ret = xhci_test_trb_in_td(xhci,
				complex_test_vector[i].input_seg,
				complex_test_vector[i].input_seg,