* [PATCH v2 0/3] RDMA/irdma: Cleanups and improvements @ 2023-05-15 19:11 Kamal Heib 2023-05-15 19:11 ` [PATCH v2 1/3] RDMA/irdma: Return void from irdma_init_iw_device() Kamal Heib 2023-05-17 19:33 ` [PATCH v2 0/3] RDMA/irdma: Cleanups and improvements Jason Gunthorpe 0 siblings, 2 replies; 5+ messages in thread From: Kamal Heib @ 2023-05-15 19:11 UTC (permalink / raw) To: linux-rdma Cc: Mustafa Ismail, Shiraz Saleem, Jason Gunthorpe, Leon Romanovsky, Kamal Heib This series includes a few cleanup patches for the irdma driver. v2: - all: Fix subject. - patch1: Make checkpatch.pl happy. Kamal Heib (3): RDMA/irdma: Return void from irdma_init_iw_device() RDMA/irdma: Return void from irdma_init_rdma_device() RDMA/irdma: Move iw device ops initialization drivers/infiniband/hw/irdma/verbs.c | 41 +++++++++++------------------ 1 file changed, 16 insertions(+), 25 deletions(-) -- 2.40.1 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 1/3] RDMA/irdma: Return void from irdma_init_iw_device() 2023-05-15 19:11 [PATCH v2 0/3] RDMA/irdma: Cleanups and improvements Kamal Heib @ 2023-05-15 19:11 ` Kamal Heib 2023-05-15 19:11 ` [PATCH v2 2/3] RDMA/irdma: Return void from irdma_init_rdma_device() Kamal Heib 2023-05-17 19:33 ` [PATCH v2 0/3] RDMA/irdma: Cleanups and improvements Jason Gunthorpe 1 sibling, 1 reply; 5+ messages in thread From: Kamal Heib @ 2023-05-15 19:11 UTC (permalink / raw) To: linux-rdma Cc: Mustafa Ismail, Shiraz Saleem, Jason Gunthorpe, Leon Romanovsky, Kamal Heib The return value from irdma_init_iw_device() is always 0 - change it to be void. Signed-off-by: Kamal Heib <kheib@redhat.com> --- drivers/infiniband/hw/irdma/verbs.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c index ab5cdf782785..baaef6ce195c 100644 --- a/drivers/infiniband/hw/irdma/verbs.c +++ b/drivers/infiniband/hw/irdma/verbs.c @@ -4515,7 +4515,7 @@ static void irdma_init_roce_device(struct irdma_device *iwdev) * irdma_init_iw_device - initialization of iwarp rdma device * @iwdev: irdma device */ -static int irdma_init_iw_device(struct irdma_device *iwdev) +static void irdma_init_iw_device(struct irdma_device *iwdev) { struct net_device *netdev = iwdev->netdev; @@ -4533,8 +4533,6 @@ static int irdma_init_iw_device(struct irdma_device *iwdev) memcpy(iwdev->ibdev.iw_ifname, netdev->name, sizeof(iwdev->ibdev.iw_ifname)); ib_set_device_ops(&iwdev->ibdev, &irdma_iw_dev_ops); - - return 0; } /** @@ -4544,15 +4542,12 @@ static int irdma_init_iw_device(struct irdma_device *iwdev) static int irdma_init_rdma_device(struct irdma_device *iwdev) { struct pci_dev *pcidev = iwdev->rf->pcidev; - int ret; - if (iwdev->roce_mode) { + if (iwdev->roce_mode) irdma_init_roce_device(iwdev); - } else { - ret = irdma_init_iw_device(iwdev); - if (ret) - return ret; - } + else + irdma_init_iw_device(iwdev); + iwdev->ibdev.phys_port_cnt = 1; iwdev->ibdev.num_comp_vectors = iwdev->rf->ceqs_count; iwdev->ibdev.dev.parent = &pcidev->dev; -- 2.40.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 2/3] RDMA/irdma: Return void from irdma_init_rdma_device() 2023-05-15 19:11 ` [PATCH v2 1/3] RDMA/irdma: Return void from irdma_init_iw_device() Kamal Heib @ 2023-05-15 19:11 ` Kamal Heib 2023-05-15 19:11 ` [PATCH v2 3/3] RDMA/irdma: Move iw device ops initialization Kamal Heib 0 siblings, 1 reply; 5+ messages in thread From: Kamal Heib @ 2023-05-15 19:11 UTC (permalink / raw) To: linux-rdma Cc: Mustafa Ismail, Shiraz Saleem, Jason Gunthorpe, Leon Romanovsky, Kamal Heib The return value from irdma_init_rdma_device() is always 0 - change it to be void. Signed-off-by: Kamal Heib <kheib@redhat.com> --- drivers/infiniband/hw/irdma/verbs.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c index baaef6ce195c..9ff06feda872 100644 --- a/drivers/infiniband/hw/irdma/verbs.c +++ b/drivers/infiniband/hw/irdma/verbs.c @@ -4539,7 +4539,7 @@ static void irdma_init_iw_device(struct irdma_device *iwdev) * irdma_init_rdma_device - initialization of rdma device * @iwdev: irdma device */ -static int irdma_init_rdma_device(struct irdma_device *iwdev) +static void irdma_init_rdma_device(struct irdma_device *iwdev) { struct pci_dev *pcidev = iwdev->rf->pcidev; @@ -4552,8 +4552,6 @@ static int irdma_init_rdma_device(struct irdma_device *iwdev) iwdev->ibdev.num_comp_vectors = iwdev->rf->ceqs_count; iwdev->ibdev.dev.parent = &pcidev->dev; ib_set_device_ops(&iwdev->ibdev, &irdma_dev_ops); - - return 0; } /** @@ -4591,9 +4589,7 @@ int irdma_ib_register_device(struct irdma_device *iwdev) { int ret; - ret = irdma_init_rdma_device(iwdev); - if (ret) - return ret; + irdma_init_rdma_device(iwdev); ret = ib_device_set_netdev(&iwdev->ibdev, iwdev->netdev, 1); if (ret) -- 2.40.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 3/3] RDMA/irdma: Move iw device ops initialization 2023-05-15 19:11 ` [PATCH v2 2/3] RDMA/irdma: Return void from irdma_init_rdma_device() Kamal Heib @ 2023-05-15 19:11 ` Kamal Heib 0 siblings, 0 replies; 5+ messages in thread From: Kamal Heib @ 2023-05-15 19:11 UTC (permalink / raw) To: linux-rdma Cc: Mustafa Ismail, Shiraz Saleem, Jason Gunthorpe, Leon Romanovsky, Kamal Heib Move the initialization of the iw device ops to be under the declaration of the irdma_iw_dev_ops. Signed-off-by: Kamal Heib <kheib@redhat.com> --- drivers/infiniband/hw/irdma/verbs.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c index 9ff06feda872..6242ab6af77f 100644 --- a/drivers/infiniband/hw/irdma/verbs.c +++ b/drivers/infiniband/hw/irdma/verbs.c @@ -4450,8 +4450,16 @@ static const struct ib_device_ops irdma_roce_dev_ops = { }; static const struct ib_device_ops irdma_iw_dev_ops = { - .modify_qp = irdma_modify_qp, .get_port_immutable = irdma_iw_port_immutable, + .iw_accept = irdma_accept, + .iw_add_ref = irdma_qp_add_ref, + .iw_connect = irdma_connect, + .iw_create_listen = irdma_create_listen, + .iw_destroy_listen = irdma_destroy_listen, + .iw_get_qp = irdma_get_qp, + .iw_reject = irdma_reject, + .iw_rem_ref = irdma_qp_rem_ref, + .modify_qp = irdma_modify_qp, .query_gid = irdma_query_gid, }; @@ -4522,14 +4530,6 @@ static void irdma_init_iw_device(struct irdma_device *iwdev) iwdev->ibdev.node_type = RDMA_NODE_RNIC; addrconf_addr_eui48((u8 *)&iwdev->ibdev.node_guid, netdev->dev_addr); - iwdev->ibdev.ops.iw_add_ref = irdma_qp_add_ref; - iwdev->ibdev.ops.iw_rem_ref = irdma_qp_rem_ref; - iwdev->ibdev.ops.iw_get_qp = irdma_get_qp; - iwdev->ibdev.ops.iw_connect = irdma_connect; - iwdev->ibdev.ops.iw_accept = irdma_accept; - iwdev->ibdev.ops.iw_reject = irdma_reject; - iwdev->ibdev.ops.iw_create_listen = irdma_create_listen; - iwdev->ibdev.ops.iw_destroy_listen = irdma_destroy_listen; memcpy(iwdev->ibdev.iw_ifname, netdev->name, sizeof(iwdev->ibdev.iw_ifname)); ib_set_device_ops(&iwdev->ibdev, &irdma_iw_dev_ops); -- 2.40.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2 0/3] RDMA/irdma: Cleanups and improvements 2023-05-15 19:11 [PATCH v2 0/3] RDMA/irdma: Cleanups and improvements Kamal Heib 2023-05-15 19:11 ` [PATCH v2 1/3] RDMA/irdma: Return void from irdma_init_iw_device() Kamal Heib @ 2023-05-17 19:33 ` Jason Gunthorpe 1 sibling, 0 replies; 5+ messages in thread From: Jason Gunthorpe @ 2023-05-17 19:33 UTC (permalink / raw) To: Kamal Heib; +Cc: linux-rdma, Mustafa Ismail, Shiraz Saleem, Leon Romanovsky On Mon, May 15, 2023 at 03:11:39PM -0400, Kamal Heib wrote: > This series includes a few cleanup patches for the irdma driver. > > v2: > - all: Fix subject. > - patch1: Make checkpatch.pl happy. > > Kamal Heib (3): > RDMA/irdma: Return void from irdma_init_iw_device() > RDMA/irdma: Return void from irdma_init_rdma_device() > RDMA/irdma: Move iw device ops initialization Applied to for-next Please fix your threading option, thread under cover letter not chain each patch. Thanks, Jason ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-05-17 19:33 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-05-15 19:11 [PATCH v2 0/3] RDMA/irdma: Cleanups and improvements Kamal Heib 2023-05-15 19:11 ` [PATCH v2 1/3] RDMA/irdma: Return void from irdma_init_iw_device() Kamal Heib 2023-05-15 19:11 ` [PATCH v2 2/3] RDMA/irdma: Return void from irdma_init_rdma_device() Kamal Heib 2023-05-15 19:11 ` [PATCH v2 3/3] RDMA/irdma: Move iw device ops initialization Kamal Heib 2023-05-17 19:33 ` [PATCH v2 0/3] RDMA/irdma: Cleanups and improvements Jason Gunthorpe
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.