Re: [PATCH] svcrdma: Cleanup sparse warnings in the svcrdma module

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

 



On Tue, Feb 14, 2012 at 05:01:25PM -0600, Tom Tucker wrote:

> -	if (ch->rc_discrim == 0)
> +	if (ch->rc_discrim == xdr_zero)

Mostly, ACK, modulo this and similar sillyness.  sparse is just fine with
use of constant 0 in bitwise contexts; it's also just fine with use of
bitwise in logical ones.

> +	nchunks = ntohl(ary->wc_nchunks);
>  	if (((unsigned long)&ary->wc_array[0] +
> -	     (sizeof(struct rpcrdma_write_chunk) * ary->wc_nchunks)) >
> +	     (sizeof(struct rpcrdma_write_chunk) * nchunks)) >

BTW, this still can overflow.  With less painful consequences than before that
patch, but...

> -			BUG_ON(0 == virt_to_page(vec[i].iov_base));
> +			BUG_ON(NULL == virt_to_page(vec[i].iov_base));

Egads...  What, "!virt_to_page(...)" would have been too pedestrian?
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux