public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leonro@mellanox.com>
To: Bart Van Assche <bvanassche@acm.org>
Cc: Jason Gunthorpe <jgg@ziepe.ca>,
	Doug Ledford <dledford@redhat.com>,
	linux-rdma@vger.kernel.org, Don Hiatt <don.hiatt@intel.com>,
	Dennis Dalessandro <dennis.dalessandro@intel.com>
Subject: Re: [PATCH 1/5] RDMA/ib_hdrs.h: Remove a superfluous cast
Date: Wed, 19 May 2021 12:00:41 +0300	[thread overview]
Message-ID: <YKTTufav7me+Sgic@unreal> (raw)
In-Reply-To: <20210512032752.16611-2-bvanassche@acm.org>

On Tue, May 11, 2021 at 08:27:48PM -0700, Bart Van Assche wrote:
> be16_to_cpu() returns a u16 value. Remove the superfluous u16 cast. That
> cast was introduced by commit 7dafbab3753f ("IB/hfi1: Add functions to
> parse BTH/IB headers").
> 
> Cc: Don Hiatt <don.hiatt@intel.com>
> Cc: Dennis Dalessandro <dennis.dalessandro@intel.com>
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
> ---
>  include/rdma/ib_hdrs.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/rdma/ib_hdrs.h b/include/rdma/ib_hdrs.h
> index 57c1ac881d08..82483120539f 100644
> --- a/include/rdma/ib_hdrs.h
> +++ b/include/rdma/ib_hdrs.h
> @@ -208,7 +208,7 @@ static inline u8 ib_get_lver(struct ib_header *hdr)
>  
>  static inline u16 ib_get_len(struct ib_header *hdr)
>  {
> -	return (u16)(be16_to_cpu(hdr->lrh[2]));
> +	return be16_to_cpu(hdr->lrh[2]);
>  }
>  
>  static inline u32 ib_get_qkey(struct ib_other_headers *ohdr)

It is unclear why this function in the header. It is called only once.

Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>

  reply	other threads:[~2021-05-19  9:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-12  3:27 [PATCH 0/5] SRP kernel patches for kernel v5.14 Bart Van Assche
2021-05-12  3:27 ` [PATCH 1/5] RDMA/ib_hdrs.h: Remove a superfluous cast Bart Van Assche
2021-05-19  9:00   ` Leon Romanovsky [this message]
2021-05-24  3:12     ` Bart Van Assche
2021-05-12  3:27 ` [PATCH 2/5] RDMA/srp: Add more structure size checks Bart Van Assche
2021-05-19  9:01   ` Leon Romanovsky
2021-05-12  3:27 ` [PATCH 3/5] RDMA/srp: Apply the __packed attribute to members instead of structures Bart Van Assche
2021-05-20 14:48   ` Jason Gunthorpe
2021-05-24  3:41     ` Bart Van Assche
2021-05-24 23:00       ` Jason Gunthorpe
2021-05-12  3:27 ` [PATCH 4/5] RDMA/srp: Fix a recently introduced memory leak Bart Van Assche
2021-05-12  8:15   ` Max Gurtovoy
2021-05-12 16:14     ` Bart Van Assche
2021-05-12  3:27 ` [PATCH 5/5] RDMA/srp: Make struct scsi_cmnd and struct srp_request adjacent Bart Van Assche
2021-05-19  9:09   ` Leon Romanovsky
2021-05-19 15:13     ` Bart Van Assche
2021-05-19 15:32       ` 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=YKTTufav7me+Sgic@unreal \
    --to=leonro@mellanox.com \
    --cc=bvanassche@acm.org \
    --cc=dennis.dalessandro@intel.com \
    --cc=dledford@redhat.com \
    --cc=don.hiatt@intel.com \
    --cc=jgg@ziepe.ca \
    --cc=linux-rdma@vger.kernel.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