From: Vinod Koul <vkoul@kernel.org>
To: cgel.zte@gmail.com
Cc: kishon@ti.com, linux-phy@lists.infradead.org,
linux-kernel@vger.kernel.org,
ye xingchen <ye.xingchen@zte.com.cn>,
Zeal Robot <zealci@zte.com.cn>
Subject: Re: [PATCH linux-next] phy: broadcom: use function devm_kcalloc() instead of devm_kzalloc()
Date: Tue, 20 Sep 2022 11:50:45 +0530 [thread overview]
Message-ID: <YylbvcFX+LHgszaS@matsya> (raw)
In-Reply-To: <20220916062150.153104-1-ye.xingchen@zte.com.cn>
On 16-09-22, 06:21, cgel.zte@gmail.com wrote:
> From: ye xingchen <ye.xingchen@zte.com.cn>
>
> Use 2-factor multiplication argument form devm_kcalloc() instead
> of devm_kzalloc().
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
Where is this report?
> Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
> ---
> drivers/phy/broadcom/phy-bcm-sr-usb.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/phy/broadcom/phy-bcm-sr-usb.c b/drivers/phy/broadcom/phy-bcm-sr-usb.c
> index 0002da3b5b5d..0d393e0cc7bb 100644
> --- a/drivers/phy/broadcom/phy-bcm-sr-usb.c
> +++ b/drivers/phy/broadcom/phy-bcm-sr-usb.c
> @@ -236,7 +236,7 @@ static int bcm_usb_phy_create(struct device *dev, struct device_node *node,
> int idx;
>
> if (version == BCM_SR_USB_COMBO_PHY) {
> - phy_cfg = devm_kzalloc(dev, NUM_BCM_SR_USB_COMBO_PHYS *
> + phy_cfg = devm_kcalloc(dev, NUM_BCM_SR_USB_COMBO_PHYS,
> sizeof(struct bcm_usb_phy_cfg),
> GFP_KERNEL);
> if (!phy_cfg)
> --
> 2.25.1
--
~Vinod
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
prev parent reply other threads:[~2022-09-20 6:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-16 6:21 [PATCH linux-next] phy: broadcom: use function devm_kcalloc() instead of devm_kzalloc() cgel.zte
2022-09-20 6:20 ` Vinod Koul [this message]
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=YylbvcFX+LHgszaS@matsya \
--to=vkoul@kernel.org \
--cc=cgel.zte@gmail.com \
--cc=kishon@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=ye.xingchen@zte.com.cn \
--cc=zealci@zte.com.cn \
/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;
as well as URLs for NNTP newsgroup(s).