]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dibs: Move struct device to dibs_dev
authorJulian Ruess <julianr@linux.ibm.com>
Thu, 18 Sep 2025 11:04:54 +0000 (13:04 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 23 Sep 2025 09:13:22 +0000 (11:13 +0200)
commit845c334a0186a23c2ac4abfb444e499fec831b24
treedc2183658a74a4fa69761f4ea8f503e802273aaa
parent69baaac9361edd169713562f088829a1be9c51a9
dibs: Move struct device to dibs_dev

Move struct device from ism_dev and smc_lo_dev to dibs_dev, and define a
corresponding release function. Free ism_dev in ism_remove() and smc_lo_dev
in smc_lo_dev_remove().

Replace smcd->ops->get_dev(smcd) by using dibs->dev directly.

An alternative design would be to embed dibs_dev as a field in ism_dev and
do the same for other dibs device driver specific structs. However that
would have the disadvantage that each dibs device driver needs to allocate
dibs_dev and each dibs device driver needs a different device release
function. The advantage would be that ism_dev and other device driver
specific structs would be covered by device reference counts.

Signed-off-by: Julian Ruess <julianr@linux.ibm.com>
Co-developed-by: Alexandra Winter <wintera@linux.ibm.com>
Signed-off-by: Alexandra Winter <wintera@linux.ibm.com>
Reviewed-by: Mahanta Jambigi <mjambigi@linux.ibm.com>
Link: https://patch.msgid.link/20250918110500.1731261-9-wintera@linux.ibm.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/dibs/dibs_loopback.c
drivers/dibs/dibs_main.c
drivers/s390/net/ism_drv.c
include/linux/dibs.h
include/linux/ism.h
include/net/smc.h
net/smc/smc_core.c
net/smc/smc_ism.c
net/smc/smc_loopback.c
net/smc/smc_loopback.h
net/smc/smc_pnet.c