mbox series

[v6,0/5] cxl: find_cxl_root() related cleanups

Message ID 170449229696.3779673.18384234151739803343.stgit@djiang5-mobl3
Headers show
Series cxl: find_cxl_root() related cleanups | expand

Message

Dave Jiang Jan. 5, 2024, 10:07 p.m. UTC
v6:
- Fix breakage in previous series for device_find_child() (Dan)
- Move DEFINE_FREE() for put_cxl_root() to first patch (Dan)
- Don't touch put_device() until final cleanup. (Dan)
- Add review tag from Ira.

This series provides a number of small cleanups to make fix_cxl_root()
and related code more readable and safer.

---

Dave Jiang (5):
      cxl: Introduce put_cxl_root() helper
      cxl: Convert find_cxl_root() to return a 'struct cxl_root *'
      cxl: Fix device reference leak in cxl_port_perf_data_calculate()
      cxl: Refactor to use __free() for cxl_root allocation in cxl_find_nvdimm_bridge()
      cxl: Refactor to use __free() for cxl_root allocation in cxl_endpoint_port_probe()


 drivers/cxl/acpi.c      |  6 ++----
 drivers/cxl/core/cdat.c | 22 ++++++++++++++--------
 drivers/cxl/core/pmem.c |  8 ++++----
 drivers/cxl/core/port.c | 13 +++++++++++--
 drivers/cxl/cxl.h       | 17 ++++++++++-------
 drivers/cxl/port.c      |  5 +++--
 6 files changed, 44 insertions(+), 27 deletions(-)

Comments

Dan Williams Jan. 5, 2024, 10:35 p.m. UTC | #1
Dave Jiang wrote:
> v6:
> - Fix breakage in previous series for device_find_child() (Dan)
> - Move DEFINE_FREE() for put_cxl_root() to first patch (Dan)
> - Don't touch put_device() until final cleanup. (Dan)
> - Add review tag from Ira.
> 
> This series provides a number of small cleanups to make fix_cxl_root()
> and related code more readable and safer.

Looks good, Dave! Thanks for the spins.
Jonathan Cameron Jan. 8, 2024, 11:53 a.m. UTC | #2
On Fri, 5 Jan 2024 14:35:14 -0800
Dan Williams <dan.j.williams@intel.com> wrote:

> Dave Jiang wrote:
> > v6:
> > - Fix breakage in previous series for device_find_child() (Dan)
> > - Move DEFINE_FREE() for put_cxl_root() to first patch (Dan)
> > - Don't touch put_device() until final cleanup. (Dan)
> > - Add review tag from Ira.
> > 
> > This series provides a number of small cleanups to make fix_cxl_root()
> > and related code more readable and safer.  
> 
> Looks good, Dave! Thanks for the spins.
> 
Subject to Robert's note on removing the root variable in patch 5 as it
now appears unused, this series looks fine to me (and I guess Dan can
probably just fix that up in the tree)

FWIW given this is already queued in in cxl/next

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Dan Williams Jan. 8, 2024, 9:05 p.m. UTC | #3
Jonathan Cameron wrote:
> On Fri, 5 Jan 2024 14:35:14 -0800
> Dan Williams <dan.j.williams@intel.com> wrote:
> 
> > Dave Jiang wrote:
> > > v6:
> > > - Fix breakage in previous series for device_find_child() (Dan)
> > > - Move DEFINE_FREE() for put_cxl_root() to first patch (Dan)
> > > - Don't touch put_device() until final cleanup. (Dan)
> > > - Add review tag from Ira.
> > > 
> > > This series provides a number of small cleanups to make fix_cxl_root()
> > > and related code more readable and safer.  
> > 
> > Looks good, Dave! Thanks for the spins.
> > 
> Subject to Robert's note on removing the root variable in patch 5 as it
> now appears unused, this series looks fine to me (and I guess Dan can
> probably just fix that up in the tree)
> 
> FWIW given this is already queued in in cxl/next
> 
> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Thanks Jonathan, will add that to the pull request.