[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z6nlLZ8wyIPUay3f@rric.localdomain>
Date: Mon, 10 Feb 2025 12:38:21 +0100
From: Robert Richter <rrichter@....com>
To: Alison Schofield <alison.schofield@...el.com>
Cc: Vishal Verma <vishal.l.verma@...el.com>,
Ira Weiny <ira.weiny@...el.com>,
Dan Williams <dan.j.williams@...el.com>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
Dave Jiang <dave.jiang@...el.com>,
Davidlohr Bueso <dave@...olabs.net>, linux-cxl@...r.kernel.org,
linux-kernel@...r.kernel.org, Gregory Price <gourry@...rry.net>,
"Fabio M. De Francesco" <fabio.m.de.francesco@...ux.intel.com>,
Terry Bowman <terry.bowman@....com>
Subject: Re: [PATCH v2 05/18] cxl: Introduce parent_port_of() helper
On 07.02.25 15:08:11, Alison Schofield wrote:
> On Fri, Feb 07, 2025 at 04:37:40PM +0100, Robert Richter wrote:
> > Often a parent port must be determined. Introduce the parent_port_of()
> > helper function for this.
>
> Would this be simpler with less touchpoints:
>
> Make next_port() available to the port driver by moving it from
> region.c to port.c. Note that simply exporting from the region
> driver is not an option since region driver is not guaranteed
> to be configured.
>
> (Basically I'm suggesting keep the name and touch region.c less)
As long as next_port() is used in a local context the function name
works well as its direct use is visible. But when exporting it, the
name "next_port()" is not very specific. So I renamed it to better
describe the function similar to other helpers like this. Changes for
the rename are just 2 lines in region.c.
The helper is only used in the core module, there is no strict need to
export it from there. Anyway, I implemented it the same way as the
to_cxl_port() helper and it can be used outside of core too. This does
not introduce more code (except for the EXPORT_SYMBOL_NS_GPL line).
Thus, I rather would like to keep the patch as it is.
Thanks for review,
-Robert
>
> >
> > Signed-off-by: Robert Richter <rrichter@....com>
> > Reviewed-by: Gregory Price <gourry@...rry.net>
> > Reviewed-by: Jonathan Cameron <Jonathan.Cameron@...wei.com>
Powered by blists - more mailing lists