From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB869C433B4 for ; Wed, 19 May 2021 09:00:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CD601611AD for ; Wed, 19 May 2021 09:00:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344273AbhESJCF (ORCPT ); Wed, 19 May 2021 05:02:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:36476 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237641AbhESJCE (ORCPT ); Wed, 19 May 2021 05:02:04 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A98D1610CC; Wed, 19 May 2021 09:00:44 +0000 (UTC) Date: Wed, 19 May 2021 12:00:41 +0300 From: Leon Romanovsky To: Bart Van Assche Cc: Jason Gunthorpe , Doug Ledford , linux-rdma@vger.kernel.org, Don Hiatt , Dennis Dalessandro Subject: Re: [PATCH 1/5] RDMA/ib_hdrs.h: Remove a superfluous cast Message-ID: References: <20210512032752.16611-1-bvanassche@acm.org> <20210512032752.16611-2-bvanassche@acm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210512032752.16611-2-bvanassche@acm.org> Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.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 > Cc: Dennis Dalessandro > Signed-off-by: Bart Van Assche > --- > 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