]> www.infradead.org Git - users/willy/xarray.git/commit
cxl/port: Use __free() to drop put_device() for cxl_port
authorLi Ming <ming4.li@intel.com>
Fri, 30 Aug 2024 01:31:36 +0000 (01:31 +0000)
committerDave Jiang <dave.jiang@intel.com>
Tue, 3 Sep 2024 21:49:48 +0000 (14:49 -0700)
commitdd2617ebd2a69c012001a29274557199409eff39
treeaf920666eeaa7f0219eddcf7898a8425d7c1160f
parentfa724cd747cdc347cde0d2ef6ba4ee34344f72cb
cxl/port: Use __free() to drop put_device() for cxl_port

Using scope-based resource management __free() marco with a new helper
called put_cxl_port() to drop open coded the put_device() used to
dereference the 'struct device' in cxl_port.

Suggested-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Li Ming <ming4.li@intel.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://patch.msgid.link/20240830013138.2256244-1-ming4.li@intel.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
drivers/cxl/core/pci.c
drivers/cxl/core/port.c
drivers/cxl/cxl.h
drivers/cxl/mem.c
drivers/cxl/pci.c