Message ID | 20210714031130.1511109-2-yanjun.zhu@linux.dev (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Jason Gunthorpe |
Headers | show |
Series | RDMA/irdma: do some cleanups | expand |
On Tue, Jul 13, 2021 at 11:11:28PM -0400, yanjun.zhu@linux.dev wrote: > From: Zhu Yanjun <yanjun.zhu@linux.dev> > > The function irdma_sc_repost_aeq_entries always returns zero. So > the returned type is changed to void. > > Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev> > --- > drivers/infiniband/hw/irdma/ctrl.c | 4 +--- > drivers/infiniband/hw/irdma/type.h | 3 +-- > 2 files changed, 2 insertions(+), 5 deletions(-) <...> > -enum irdma_status_code irdma_sc_repost_aeq_entries(struct irdma_sc_dev *dev, > - u32 count); I clearly remember that Jakub asked for more than once to remo remove custom ice/irdma error codes. Did it happen? Can we get rid from them in RDMA too? Thanks
On Wed, Jul 14, 2021 at 5:15 PM Leon Romanovsky <leon@kernel.org> wrote: > > On Tue, Jul 13, 2021 at 11:11:28PM -0400, yanjun.zhu@linux.dev wrote: > > From: Zhu Yanjun <yanjun.zhu@linux.dev> > > > > The function irdma_sc_repost_aeq_entries always returns zero. So > > the returned type is changed to void. > > > > Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev> > > --- > > drivers/infiniband/hw/irdma/ctrl.c | 4 +--- > > drivers/infiniband/hw/irdma/type.h | 3 +-- > > 2 files changed, 2 insertions(+), 5 deletions(-) > > <...> > > > -enum irdma_status_code irdma_sc_repost_aeq_entries(struct irdma_sc_dev *dev, > > - u32 count); > > I clearly remember that Jakub asked for more than once to remo remove > custom ice/irdma error codes. Did it happen? Can we get rid from them > in RDMA too? No. This is not related with custom ice/irdma error codes. This is related with the returned type of the function. If a function always returns 0, change the function returned type to void. And remove the related returned value check. Zhu Yanjun > > Thanks
On Wed, Jul 14, 2021 at 05:23:33PM +0800, Zhu Yanjun wrote: > On Wed, Jul 14, 2021 at 5:15 PM Leon Romanovsky <leon@kernel.org> wrote: > > > > On Tue, Jul 13, 2021 at 11:11:28PM -0400, yanjun.zhu@linux.dev wrote: > > > From: Zhu Yanjun <yanjun.zhu@linux.dev> > > > > > > The function irdma_sc_repost_aeq_entries always returns zero. So > > > the returned type is changed to void. > > > > > > Signed-off-by: Zhu Yanjun <yanjun.zhu@linux.dev> > > > --- > > > drivers/infiniband/hw/irdma/ctrl.c | 4 +--- > > > drivers/infiniband/hw/irdma/type.h | 3 +-- > > > 2 files changed, 2 insertions(+), 5 deletions(-) > > > > <...> > > > > > -enum irdma_status_code irdma_sc_repost_aeq_entries(struct irdma_sc_dev *dev, > > > - u32 count); > > > > I clearly remember that Jakub asked for more than once to remo remove > > custom ice/irdma error codes. Did it happen? Can we get rid from them > > in RDMA too? > > No. This is not related with custom ice/irdma error codes. I'm not talking about your specific change, but pointed to the fact that custom error codes are not cleaned despite multiple requests. Thanks
diff --git a/drivers/infiniband/hw/irdma/ctrl.c b/drivers/infiniband/hw/irdma/ctrl.c index b1023a7d0bd1..777e35620635 100644 --- a/drivers/infiniband/hw/irdma/ctrl.c +++ b/drivers/infiniband/hw/irdma/ctrl.c @@ -4187,11 +4187,9 @@ enum irdma_status_code irdma_sc_get_next_aeqe(struct irdma_sc_aeq *aeq, * @dev: sc device struct * @count: allocate count */ -enum irdma_status_code irdma_sc_repost_aeq_entries(struct irdma_sc_dev *dev, u32 count) +void irdma_sc_repost_aeq_entries(struct irdma_sc_dev *dev, u32 count) { writel(count, dev->hw_regs[IRDMA_AEQALLOC]); - - return 0; } /** diff --git a/drivers/infiniband/hw/irdma/type.h b/drivers/infiniband/hw/irdma/type.h index 7387b83e826d..874bc25a938b 100644 --- a/drivers/infiniband/hw/irdma/type.h +++ b/drivers/infiniband/hw/irdma/type.h @@ -1222,8 +1222,7 @@ enum irdma_status_code irdma_sc_aeq_init(struct irdma_sc_aeq *aeq, struct irdma_aeq_init_info *info); enum irdma_status_code irdma_sc_get_next_aeqe(struct irdma_sc_aeq *aeq, struct irdma_aeqe_info *info); -enum irdma_status_code irdma_sc_repost_aeq_entries(struct irdma_sc_dev *dev, - u32 count); +void irdma_sc_repost_aeq_entries(struct irdma_sc_dev *dev, u32 count); void irdma_sc_pd_init(struct irdma_sc_dev *dev, struct irdma_sc_pd *pd, u32 pd_id, int abi_ver);