Re: [PATCH for-next 2/9] RDMA/hns: Add CQ flag instead of independent enable flag

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

 



On Wed, May 20, 2020 at 09:53:12PM +0800, Weihang Li wrote:
> +	roce_set_bit(cq_context->byte_44_db_record,
> +		     V2_CQC_BYTE_44_DB_RECORD_EN_S,
> +		     (hr_cq->flags & HNS_ROCE_CQ_FLAG_RECORD_DB) ? 1 : 0);

It seems like the if expression should be inside the roce_set_bit
macro (just cast to bool) as something called 'bit' should have that
safety built in.

Also, if someone wants a project, all this endless stuff should be
using genmask and field_prep instead of this home grown stuff.

Jason



[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