[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250410-simplify_memset-v1-1-c7bbd850e520@quicinc.com>
Date: Thu, 10 Apr 2025 21:30:00 +0800
From: Zijun Hu <zijun_hu@...oud.com>
To: Thinh Nguyen <Thinh.Nguyen@...opsys.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Zijun Hu <zijun_hu@...oud.com>, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org, Zijun Hu <quic_zijuhu@...cinc.com>
Subject: [PATCH] usb: dwc3: Simplify memset struct array
From: Zijun Hu <quic_zijuhu@...cinc.com>
For 'struct property_entry props[6]', Simplify its memset to
'memset(props, 0, sizeof(props))'.
Signed-off-by: Zijun Hu <quic_zijuhu@...cinc.com>
---
drivers/usb/dwc3/host.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/dwc3/host.c b/drivers/usb/dwc3/host.c
index b48e108fc8fe7343446946e7babf9ba3bc0d2dc3..5a2fe4c6b0e433c32945c136b8b35e1912e3acc8 100644
--- a/drivers/usb/dwc3/host.c
+++ b/drivers/usb/dwc3/host.c
@@ -158,7 +158,7 @@ int dwc3_host_init(struct dwc3 *dwc)
goto err;
}
- memset(props, 0, sizeof(struct property_entry) * ARRAY_SIZE(props));
+ memset(props, 0, sizeof(props));
props[prop_idx++] = PROPERTY_ENTRY_BOOL("xhci-sg-trb-cache-size-quirk");
---
base-commit: 0af2f6be1b4281385b618cb86ad946eded089ac8
change-id: 20250410-simplify_memset-0ea6dc94a0c7
Best regards,
--
Zijun Hu <quic_zijuhu@...cinc.com>
Powered by blists - more mailing lists