Re: [PATCH v2 2/5] PCI: spacemit-k1: Add multiple PHY handles support

From: Andy Shevchenko

Date: Sun May 17 2026 - 04:07:54 EST


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.

> + if (!k1->phy)
> + return -ENOMEM;

--
With Best Regards,
Andy Shevchenko