From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: davidcomponentone@gmail.com
Cc: agross@kernel.org, kishon@ti.com, vkoul@kernel.org,
linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org,
linux-kernel@vger.kernel.org, Zeal Robot <zealci@zte.com.cn>,
Yang Guang <yang.guang5@zte.com.cn>
Subject: Re: [PATCH] pyh: qcom: fix the application of sizeof to pointer
Date: Tue, 7 Dec 2021 21:16:27 -0800 [thread overview]
Message-ID: <YbA/q+dYoIh5qdbb@ripper> (raw)
In-Reply-To: <c74d05d5197fa4fba96c4bd1cd597cd644c694b6.1638924754.git.davidcomponentone@gmail.com>
On Tue 07 Dec 17:03 PST 2021, davidcomponentone@gmail.com wrote:
> From: David Yang <davidcomponentone@gmail.com>
>
> The coccinelle check report:
> ./drivers/phy/qualcomm/phy-qcom-edp.c:574:31-37:
> ERROR: application of sizeof to pointer
>
> Using the real size to fix it.
>
Thanks for the fix David.
Please see my answer here
https://lore.kernel.org/all/Ya96KOynsO478cVx@ripper/
Regards,
Bjorn
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Yang Guang <yang.guang5@zte.com.cn>
> Signed-off-by: David Yang <davidcomponentone@gmail.com>
> ---
> drivers/phy/qualcomm/phy-qcom-edp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/phy/qualcomm/phy-qcom-edp.c b/drivers/phy/qualcomm/phy-qcom-edp.c
> index 17d5653b661d..5fe4eab9cac1 100644
> --- a/drivers/phy/qualcomm/phy-qcom-edp.c
> +++ b/drivers/phy/qualcomm/phy-qcom-edp.c
> @@ -571,7 +571,7 @@ static int qcom_edp_clks_register(struct qcom_edp *edp, struct device_node *np)
> struct clk_init_data init = { };
> int ret;
>
> - data = devm_kzalloc(edp->dev, sizeof(data), GFP_KERNEL);
> + data = devm_kzalloc(edp->dev, sizeof(*data), GFP_KERNEL);
> if (!data)
> return -ENOMEM;
>
> --
> 2.30.2
>
WARNING: multiple messages have this Message-ID (diff)
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: davidcomponentone@gmail.com
Cc: agross@kernel.org, kishon@ti.com, vkoul@kernel.org,
linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org,
linux-kernel@vger.kernel.org, Zeal Robot <zealci@zte.com.cn>,
Yang Guang <yang.guang5@zte.com.cn>
Subject: Re: [PATCH] pyh: qcom: fix the application of sizeof to pointer
Date: Tue, 7 Dec 2021 21:16:27 -0800 [thread overview]
Message-ID: <YbA/q+dYoIh5qdbb@ripper> (raw)
In-Reply-To: <c74d05d5197fa4fba96c4bd1cd597cd644c694b6.1638924754.git.davidcomponentone@gmail.com>
On Tue 07 Dec 17:03 PST 2021, davidcomponentone@gmail.com wrote:
> From: David Yang <davidcomponentone@gmail.com>
>
> The coccinelle check report:
> ./drivers/phy/qualcomm/phy-qcom-edp.c:574:31-37:
> ERROR: application of sizeof to pointer
>
> Using the real size to fix it.
>
Thanks for the fix David.
Please see my answer here
https://lore.kernel.org/all/Ya96KOynsO478cVx@ripper/
Regards,
Bjorn
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Yang Guang <yang.guang5@zte.com.cn>
> Signed-off-by: David Yang <davidcomponentone@gmail.com>
> ---
> drivers/phy/qualcomm/phy-qcom-edp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/phy/qualcomm/phy-qcom-edp.c b/drivers/phy/qualcomm/phy-qcom-edp.c
> index 17d5653b661d..5fe4eab9cac1 100644
> --- a/drivers/phy/qualcomm/phy-qcom-edp.c
> +++ b/drivers/phy/qualcomm/phy-qcom-edp.c
> @@ -571,7 +571,7 @@ static int qcom_edp_clks_register(struct qcom_edp *edp, struct device_node *np)
> struct clk_init_data init = { };
> int ret;
>
> - data = devm_kzalloc(edp->dev, sizeof(data), GFP_KERNEL);
> + data = devm_kzalloc(edp->dev, sizeof(*data), GFP_KERNEL);
> if (!data)
> return -ENOMEM;
>
> --
> 2.30.2
>
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
next prev parent reply other threads:[~2021-12-08 5:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-08 1:03 [PATCH] pyh: qcom: fix the application of sizeof to pointer davidcomponentone
2021-12-08 1:03 ` davidcomponentone
2021-12-08 5:16 ` Bjorn Andersson [this message]
2021-12-08 5:16 ` Bjorn Andersson
-- strict thread matches above, loose matches on Subject: below --
2021-12-10 6:21 davidcomponentone
2021-12-10 6:21 ` davidcomponentone
2021-12-14 9:26 ` Vinod Koul
2021-12-14 9:26 ` Vinod Koul
2021-12-14 10:17 ` David Yang
2021-12-14 10:17 ` David Yang
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=YbA/q+dYoIh5qdbb@ripper \
--to=bjorn.andersson@linaro.org \
--cc=agross@kernel.org \
--cc=davidcomponentone@gmail.com \
--cc=kishon@ti.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=vkoul@kernel.org \
--cc=yang.guang5@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.