Re: [PATCH 1/5] RDMA/ib_hdrs.h: Remove a superfluous cast

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

 



On 5/19/21 2:00 AM, Leon Romanovsky wrote:
> On Tue, May 11, 2021 at 08:27:48PM -0700, Bart Van Assche wrote:
>> 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.

That's a good point. I will move it into the .c file that uses this
function.

Thanks,

Bart.




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux