[PATCH v2 2/5] PCI: spacemit-k1: Add multiple PHY handles support
Inochi Amaoto
inochiama at gmail.com
Sun May 17 18:18:13 PDT 2026
On Sun, May 17, 2026 at 11:07:40AM +0300, Andy Shevchenko wrote:
> On Sun, May 17, 2026 at 09:48:37AM +0800, Inochi Amaoto wrote:
> > The PCIe controller on Spacemit K3 may use multiple PHYs at the
> > same time. The feature is not support by the current driver.
> > So extend the PHY definition to support multiple PHY handles.
>
> ...
>
> > + k1->phy = devm_kmalloc_array(dev, 1, sizeof(*k1->phy), GFP_KERNEL);
>
> Hmm... What's the point in having _array(1) ? devm_kmalloc() should suffice.
>
Yes, you are right, I forgot it is "struct phy *", so the devm_kmalloc()
is enough, will fix in the next version.
Regards,
Inochi
> > + if (!k1->phy)
> > + return -ENOMEM;
>
> --
> With Best Regards,
> Andy Shevchenko
>
>
More information about the linux-riscv
mailing list