Re: [PATCH] RDMA/rtrs: get rid of the do_next_path while_next_path macros

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 22, 2020 at 07:39:24AM +0200, Danil Kipnis wrote:
> The macros do_each_path/while_each_path lead to a smatch warning:
> drivers/infiniband/ulp/rtrs/rtrs-clt.c:1196 rtrs_clt_failover_req() warn: inconsistent indenting
> drivers/infiniband/ulp/rtrs/rtrs-clt.c:2890 rtrs_clt_request() warn: inconsistent indenting
> 
> Also checkpatch complains:
> ERROR: Macros with multiple statements should be enclosed in a do - while loop
> 
> The macros are used only in two places: for a normal IO path and for the
> failover path triggered after errors.
> 
> Get rid of the macros and just use a for loop iterating over the list
> of paths in both places. It is easier to read and also less lines of code.
> 
> Fixes: 6a98d71daea1 ("RDMA/rtrs: client: main functionality")
> Reported-by: kbuild test robot <lkp@xxxxxxxxx>
> Signed-off-by: Danil Kipnis <danil.kipnis@xxxxxxxxxxxxxxx>
> ---
>  drivers/infiniband/ulp/rtrs/rtrs-clt.c | 29 ++++++++++++--------------
>  1 file changed, 13 insertions(+), 16 deletions(-)

Applied to for-next, thanks

Jason



[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux