Re: [RFC PATCH net-next v5 2/9] net/smc: Decouple ism_dev from SMC-D DMB registration

From: Simon Horman
Date: Fri Apr 28 2023 - 10:40:55 EST


On Sun, Apr 23, 2023 at 08:17:44PM +0800, Wen Gu wrote:
> This patch tries to decouple ISM device from SMC-D DMB registration,
> So that the register_dmb option is not restricted to be used by ISM
> device.
>
> Signed-off-by: Wen Gu <guwen@xxxxxxxxxxxxxxxxx>
> ---
> drivers/s390/net/ism_drv.c | 5 +++--
> include/net/smc.h | 4 ++--
> net/smc/smc_ism.c | 7 ++-----
> 3 files changed, 7 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/s390/net/ism_drv.c b/drivers/s390/net/ism_drv.c
> index 8acb9eb..5eeb54d 100644
> --- a/drivers/s390/net/ism_drv.c
> +++ b/drivers/s390/net/ism_drv.c
> @@ -796,9 +796,10 @@ static int smcd_query_rgid(struct smcd_dev *smcd, u64 rgid, u32 vid_valid,
> }
>
> static int smcd_register_dmb(struct smcd_dev *smcd, struct smcd_dmb *dmb,
> - struct ism_client *client)
> + void *client_priv)
> {
> - return ism_register_dmb(smcd->priv, (struct ism_dmb *)dmb, client);
> + return ism_register_dmb(smcd->priv, (struct ism_dmb *)dmb,
> + (struct ism_client *)client_priv);

Hi Wen Gu,

a minor nit from my side: there is no need to cast a void pointer to
another type.

> }
>
> static int smcd_unregister_dmb(struct smcd_dev *smcd, struct smcd_dmb *dmb)

...