Re: [PATCH v2 3/4] phy: core: Add phy bulk data helper functions
From: Inochi Amaoto
Date: Mon Sep 07 2026 - 07:54:08 EST
On Mon, Sep 07, 2026 at 01:56:11PM +0300, Vladimir Oltean wrote:
> On Fri, Sep 04, 2026 at 04:37:07PM +0800, Inochi Amaoto wrote:
> > diff --git a/include/linux/phy/phy.h b/include/linux/phy/phy.h
> > index ea47975e288a..13f9f030122f 100644
> > --- a/include/linux/phy/phy.h
> > +++ b/include/linux/phy/phy.h
> > @@ -81,6 +81,17 @@ union phy_configure_opts {
> > struct phy_configure_opts_hdmi hdmi;
> > };
> >
> > +/**
> > + * struct phy_bulk_data - Data used for bulk phy operations.
> > + *
> > + * @id: phy consumer ID
> > + * @phy: struct phy * to store the associated phy
> > + */
> > +struct phy_bulk_data {
> > + const char *id;
> > + struct phy *phy;
>
> It's not clear from your design intention if struct phy_bulk_data :: phy
> is permitted to be accessed individually by consumers. Personally I see
> no reason to. In that case, can you explicitly mark "struct phy *phy" as
> "/* private: Internal use */" (like struct regulator_bulk_data does,
> albeit for "ret"), or simply say in the kernel-doc description that it
> is managed internally by the PHY framework (as is done for both struct
> regulator_bulk_data and for struct icc_bulk_data :: path)?
>
> This should help at least LLM review flag abusive users.
>
> > +};
Yes, in my design it does not allow and I have no reason for this too.
Because the bulk data helpers are for ones that does not care a specific
phy. So this is fine for me. Thanks for the thing I have missed.
Regards
Inochi