From: Simon Horman <simon.horman@corigine.com>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Jose Abreu <joabreu@synopsys.com>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Jon Hunter <jonathanh@nvidia.com>,
Revanth Kumar Uppala <ruppala@nvidia.com>,
Bhadram Varka <vbhadram@nvidia.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
netdev@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-stm32@st-md-mailman.stormreply.com
Subject: Re: [PATCH] net: stmmac: tegra: Properly allocate clock bulk data
Date: Thu, 27 Jul 2023 13:49:33 +0200 [thread overview]
Message-ID: <ZMJZzfqBxRNSeLxc@corigine.com> (raw)
In-Reply-To: <20230726163200.2138394-1-thierry.reding@gmail.com>
On Wed, Jul 26, 2023 at 06:32:00PM +0200, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
+ Revanth Kumar Uppala <ruppala@nvidia.com>,
Bhadram Varka <vbhadram@nvidia.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
linux-arm-kernel@lists.infradead.org,
linux-stm32@st-md-mailman.stormreply.com
As per the output of
./scripts/get_maintainer.pl --git-min-percent 25 this.patch
which is the preferred method to determine the CC list for
Networking patches.
> The clock data is an array of struct clk_bulk_data, so make sure to
> allocate enough memory.
>
> Fixes: d8ca113724e7 ("net: stmmac: tegra: Add MGBE support")
> Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
> ---
> drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c
> index 99e2e5a5cd60..78a492b91bc6 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c
> @@ -234,7 +234,8 @@ static int tegra_mgbe_probe(struct platform_device *pdev)
> res.addr = mgbe->regs;
> res.irq = irq;
>
> - mgbe->clks = devm_kzalloc(&pdev->dev, sizeof(*mgbe->clks), GFP_KERNEL);
> + mgbe->clks = devm_kcalloc(&pdev->dev, ARRAY_SIZE(mgbe_clks),
> + sizeof(*mgbe->clks), GFP_KERNEL);
> if (!mgbe->clks)
> return -ENOMEM;
>
> --
> 2.41.0
>
>
WARNING: multiple messages have this Message-ID (diff)
From: Simon Horman <simon.horman@corigine.com>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Jose Abreu <joabreu@synopsys.com>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Jon Hunter <jonathanh@nvidia.com>,
Revanth Kumar Uppala <ruppala@nvidia.com>,
Bhadram Varka <vbhadram@nvidia.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
netdev@vger.kernel.org, linux-tegra@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-stm32@st-md-mailman.stormreply.com
Subject: Re: [PATCH] net: stmmac: tegra: Properly allocate clock bulk data
Date: Thu, 27 Jul 2023 13:49:33 +0200 [thread overview]
Message-ID: <ZMJZzfqBxRNSeLxc@corigine.com> (raw)
In-Reply-To: <20230726163200.2138394-1-thierry.reding@gmail.com>
On Wed, Jul 26, 2023 at 06:32:00PM +0200, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
+ Revanth Kumar Uppala <ruppala@nvidia.com>,
Bhadram Varka <vbhadram@nvidia.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
linux-arm-kernel@lists.infradead.org,
linux-stm32@st-md-mailman.stormreply.com
As per the output of
./scripts/get_maintainer.pl --git-min-percent 25 this.patch
which is the preferred method to determine the CC list for
Networking patches.
> The clock data is an array of struct clk_bulk_data, so make sure to
> allocate enough memory.
>
> Fixes: d8ca113724e7 ("net: stmmac: tegra: Add MGBE support")
> Signed-off-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
> ---
> drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c
> index 99e2e5a5cd60..78a492b91bc6 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-tegra.c
> @@ -234,7 +234,8 @@ static int tegra_mgbe_probe(struct platform_device *pdev)
> res.addr = mgbe->regs;
> res.irq = irq;
>
> - mgbe->clks = devm_kzalloc(&pdev->dev, sizeof(*mgbe->clks), GFP_KERNEL);
> + mgbe->clks = devm_kcalloc(&pdev->dev, ARRAY_SIZE(mgbe_clks),
> + sizeof(*mgbe->clks), GFP_KERNEL);
> if (!mgbe->clks)
> return -ENOMEM;
>
> --
> 2.41.0
>
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-07-27 11:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-26 16:32 [PATCH] net: stmmac: tegra: Properly allocate clock bulk data Thierry Reding
2023-07-27 11:49 ` Simon Horman [this message]
2023-07-27 11:49 ` Simon Horman
2023-07-29 16:10 ` patchwork-bot+netdevbpf
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=ZMJZzfqBxRNSeLxc@corigine.com \
--to=simon.horman@corigine.com \
--cc=alexandre.torgue@foss.st.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=joabreu@synopsys.com \
--cc=jonathanh@nvidia.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=linux-tegra@vger.kernel.org \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=peppe.cavallaro@st.com \
--cc=ruppala@nvidia.com \
--cc=thierry.reding@gmail.com \
--cc=vbhadram@nvidia.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 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.