From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Zijun Hu <zijun_hu@icloud.com>
Cc: Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Zijun Hu <quic_zijuhu@quicinc.com>
Subject: Re: [PATCH] usb: dwc3: Simplify memset struct array
Date: Thu, 10 Apr 2025 19:02:52 +0200 [thread overview]
Message-ID: <2025041024-napping-renewed-1b41@gregkh> (raw)
In-Reply-To: <20250410-simplify_memset-v1-1-c7bbd850e520@quicinc.com>
On Thu, Apr 10, 2025 at 09:30:00PM +0800, Zijun Hu wrote:
> 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));
What does this really help with? It feels like churn to me.
thanks,
greg k-h
next prev parent reply other threads:[~2025-04-10 17:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-10 13:30 [PATCH] usb: dwc3: Simplify memset struct array Zijun Hu
2025-04-10 17:02 ` Greg Kroah-Hartman [this message]
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=2025041024-napping-renewed-1b41@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=Thinh.Nguyen@synopsys.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=quic_zijuhu@quicinc.com \
--cc=zijun_hu@icloud.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