From: Zijun Hu <zijun_hu@icloud.com>
To: Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Zijun Hu <zijun_hu@icloud.com>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Zijun Hu <quic_zijuhu@quicinc.com>
Subject: [PATCH] usb: dwc3: Simplify memset struct array
Date: Thu, 10 Apr 2025 21:30:00 +0800 [thread overview]
Message-ID: <20250410-simplify_memset-v1-1-c7bbd850e520@quicinc.com> (raw)
From: Zijun Hu <quic_zijuhu@quicinc.com>
For 'struct property_entry props[6]', Simplify its memset to
'memset(props, 0, sizeof(props))'.
Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.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@quicinc.com>
next reply other threads:[~2025-04-10 13:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-10 13:30 Zijun Hu [this message]
2025-04-10 17:02 ` [PATCH] usb: dwc3: Simplify memset struct array Greg Kroah-Hartman
2025-04-11 0:07 ` Zijun Hu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250410-simplify_memset-v1-1-c7bbd850e520@quicinc.com \
--to=zijun_hu@icloud.com \
--cc=Thinh.Nguyen@synopsys.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=quic_zijuhu@quicinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox