public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Cc: yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org,
	dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 1/2] IB/mlx4: Make function use_tunnel_data return void
Date: Wed, 27 Jul 2016 14:39:40 +0300	[thread overview]
Message-ID: <20160727113940.GH4628@leon.nu> (raw)
In-Reply-To: <1469607893-10657-2-git-send-email-yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 2121 bytes --]

On Wed, Jul 27, 2016 at 01:24:52AM -0700, Yuval Shaia wrote:
> No need to return int if function always returns 0
> 
> Signed-off-by: Yuval Shaia <yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
> ---
>  drivers/infiniband/hw/mlx4/cq.c |   11 +++++------
>  1 files changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/infiniband/hw/mlx4/cq.c b/drivers/infiniband/hw/mlx4/cq.c
> index 9f8b516..4c2e1b0 100644
> --- a/drivers/infiniband/hw/mlx4/cq.c
> +++ b/drivers/infiniband/hw/mlx4/cq.c
> @@ -576,8 +576,8 @@ static int mlx4_ib_ipoib_csum_ok(__be16 status, __be16 checksum)
>  		checksum == cpu_to_be16(0xffff);
>  }
>  
> -static int use_tunnel_data(struct mlx4_ib_qp *qp, struct mlx4_ib_cq *cq, struct ib_wc *wc,
> -			   unsigned tail, struct mlx4_cqe *cqe, int is_eth)
> +static void use_tunnel_data(struct mlx4_ib_qp *qp, struct mlx4_ib_cq *cq, struct ib_wc *wc,
> +			    unsigned tail, struct mlx4_cqe *cqe, int is_eth)
>  {
>  	struct mlx4_ib_proxy_sqp_hdr *hdr;
>  
> @@ -600,8 +600,6 @@ static int use_tunnel_data(struct mlx4_ib_qp *qp, struct mlx4_ib_cq *cq, struct
>  		wc->slid        = be16_to_cpu(hdr->tun.slid_mac_47_32);
>  		wc->sl          = (u8) (be16_to_cpu(hdr->tun.sl_vid) >> 12);
>  	}
> -
> -	return 0;
>  }
>  
>  static void mlx4_ib_qp_sw_comp(struct mlx4_ib_qp *qp, int num_entries,
> @@ -853,8 +851,9 @@ repoll:
>  			if ((*cur_qp)->mlx4_ib_qp_type &
>  			    (MLX4_IB_QPT_PROXY_SMI_OWNER |
>  			     MLX4_IB_QPT_PROXY_SMI | MLX4_IB_QPT_PROXY_GSI))
> -				return use_tunnel_data(*cur_qp, cq, wc, tail,
> -						       cqe, is_eth);
> +				use_tunnel_data(*cur_qp, cq, wc, tail, cqe,
> +						is_eth);
> +				return 0;

Yeah, kbuild spotted excellent point.
It should be guarded by {}

return X -> { X; return 0; }

>  		}
>  
>  		wc->slid	   = be16_to_cpu(cqe->rlid);
> -- 
> 1.7.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2016-07-27 11:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-27  8:24 IB/mlx4: Use EAGAIN error code instead or EINVAL in function mlx4_ib_poll_one Yuval Shaia
     [not found] ` <1469607893-10657-1-git-send-email-yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2016-07-27  8:24   ` [PATCH 1/2] IB/mlx4: Make function use_tunnel_data return void Yuval Shaia
     [not found]     ` <1469607893-10657-2-git-send-email-yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
2016-07-27  8:52       ` kbuild test robot
2016-07-27 11:39       ` Leon Romanovsky [this message]
2016-07-27 12:53       ` kbuild test robot
2016-07-27  8:24   ` [PATCH 2/2] IB/mlx4: Return EAGAIN for any error in mlx4_ib_poll_one Yuval Shaia
2016-07-27  8:58   ` IB/mlx4: Use EAGAIN error code instead or EINVAL in function mlx4_ib_poll_one Leon Romanovsky
     [not found]     ` <20160727085800.GF4628-2ukJVAZIZ/Y@public.gmane.org>
2016-07-27 10:26       ` Yuval Shaia
     [not found]         ` <20160727102640.GA3549-Hxa29pjIrETlQW142y8m19+IiqhCXseY@public.gmane.org>
2016-07-27 11:23           ` Leon Romanovsky
     [not found]             ` <20160727112329.GG4628-2ukJVAZIZ/Y@public.gmane.org>
2016-07-27 11:42               ` Yuval Shaia
     [not found]                 ` <20160727114238.GB3549-Hxa29pjIrETlQW142y8m19+IiqhCXseY@public.gmane.org>
2016-07-27 12:34                   ` Leon Romanovsky

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=20160727113940.GH4628@leon.nu \
    --to=leon-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=hal.rosenstock-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=yishaih-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org \
    --cc=yuval.shaia-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
    /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