Re: [PATCH v8 07/16] usb: core: Move struct usb_port and related APIs to port.h

Andy Shevchenko <[email protected]>
Newsgroups org.kernel.vger.linux-acpi,dev.linux.lists.driver-core,org.infradead.lists.linux-arm-kernel,org.infradead.lists.linux-mediatek,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pm,org.kernel.vger.linux-usb
Organization Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo
Message-ID <[email protected]>
On Fri, Sep 04, 2026 at 07:52:37PM +0200, Greg Kroah-Hartman wrote:
> On Sat, Sep 05, 2026 at 01:24:20AM +0800, Chen-Yu Tsai wrote:
> > On Sat, Sep 5, 2026 at 12:47 AM Greg Kroah-Hartman
> > <[email protected]> wrote:
> > >
> > > On Fri, Sep 04, 2026 at 04:41:46PM +0800, Chen-Yu Tsai wrote:
> > > > |struct usb_port| and its matching container_of() macro should live in
> > > > its own port.h, matching the split we have for .c files.
> > >
> > > Why?
> > 
> > This was requested by Andy. And to me it sort of made sense.
> > 
> > > > Move them as described. Also move usb_port_is_power_on(), since in the
> > > > next change its |struct usb_hub *| parameter will be changed to
> > > > |struct usb_port *|, and becomes a non-static function that only
> > > > references |struct usb_port|.
> > >
> > > No, please don't do that unless you have a really good reason.
> > 
> > Which part? Move the code?
> 
> Please don't make a new .h file.
> 
> Moving the function might make sense on its own if you need it in a
> different file later on, but do a move only, and then change things if
> you really need to do that.

Isn't this file to break possible circular dependencies?

-- 
With Best Regards,
Andy Shevchenko
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.