[ofa-general] Re: [PATCH 2/3 v2] mlx4: multicast cast loopback block

Roland Dreier rdreier at cisco.com
Mon Jun 23 13:43:30 PDT 2008


Please run your patches through scripts/checkpatch.pl and consider the
output before sending them... it's easy to do and saves everyone time
fixing trivial style mistakes.

More substantive comments:

 > +	if (to_mqp(ibqp)->flags & MLX4_IB_QP_BLOCK_LOOPBACK)
 > +                return mlx4_multicast_attach(to_mdev(ibqp->device)->dev,
 > +                                              &to_mqp(ibqp)->mqp, gid->raw, 1);
 > +        else
 > +                return mlx4_multicast_attach(to_mdev(ibqp->device)->dev,
 > +                                              &to_mqp(ibqp)->mqp, gid->raw, 0);

Am I missing something?  Is there a reason not to write this as:

	return mlx4_multicast_attach(to_mdev(ibqp->device)->dev,
				     &to_mqp(ibqp)->mqp, gid->raw,
				     !!(to_mqp(ibqp)->flags & MLX4_IB_QP_BLOCK_LOOPBACK));

 - R.



More information about the general mailing list