On Wed, Sep 09, 2026 at 04:00:15PM +0800, Inochi Amaoto wrote:
On Tue, Sep 08, 2026 at 01:29:27PM +0300, Andy Shevchenko wrote:
quoted
On Mon, Sep 07, 2026 at 07:26:01PM +0800, Inochi Amaoto wrote:
...
quoted
quoted
+ count = devm_of_phy_bulk_get_all(dev, node, &k1->phys);
+ if (count < 0)
+ return count;
+ if (count == 0 || count > data->max_phy_count)
+ return -EINVAL;
Elsewhere we distinguish count == 0 with -ENOENT.
Is there is an example? I think it is suitable for its internal check
to translate -ENOENT to count 0, because no phys property means no
phy. For a get helper with optional semantics. I think it is fine
to return 0.
This the brief list of what I roughly grepped with word "count" in the name.
gpiod_count()
of_hte_req_count()
i2c_acpi_resource_count()
ice_sriov_set_msix_vec_count()
reset_control_get_count()
--
With Best Regards,
Andy Shevchenko