linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Danil Kipnis <danil.kipnis@cloud.ionos.com>
Cc: linux-block@vger.kernel.org, linux-rdma@vger.kernel.org,
	linux-next@vger.kernel.org, bvanassche@acm.org,
	dledford@redhat.com, axboe@kernel.dk, lkp@intel.com,
	jinpu.wang@cloud.ionos.com
Subject: Re: [PATCH] RDMA/rtrs: get rid of the do_next_path while_next_path macros
Date: Fri, 22 May 2020 21:24:56 -0300	[thread overview]
Message-ID: <20200523002456.GB9180@ziepe.ca> (raw)
In-Reply-To: <20200522053924.528980-1-danil.kipnis@cloud.ionos.com>

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@intel.com>
> Signed-off-by: Danil Kipnis <danil.kipnis@cloud.ionos.com>
> ---
>  drivers/infiniband/ulp/rtrs/rtrs-clt.c | 29 ++++++++++++--------------
>  1 file changed, 13 insertions(+), 16 deletions(-)

Applied to for-next, thanks

Jason

  reply	other threads:[~2020-05-23  0:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-19 11:29 [PATCH v2] rtrs-clt: silence kbuild test inconsistent intenting smatch warning Danil Kipnis
2020-05-19 14:29 ` Bart Van Assche
2020-05-19 23:38   ` Jason Gunthorpe
2020-05-20 10:04     ` Danil Kipnis
2020-05-20 19:11       ` Jason Gunthorpe
2020-05-22  5:39         ` [PATCH] RDMA/rtrs: get rid of the do_next_path while_next_path macros Danil Kipnis
2020-05-23  0:24           ` Jason Gunthorpe [this message]
2020-05-20 10:02   ` [PATCH v2] rtrs-clt: silence kbuild test inconsistent intenting smatch warning Danil Kipnis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200523002456.GB9180@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=danil.kipnis@cloud.ionos.com \
    --cc=dledford@redhat.com \
    --cc=jinpu.wang@cloud.ionos.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=lkp@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).