From: Al Viro <viro@ZenIV.linux.org.uk>
To: Tom Tucker <tom@ogc.us>
Cc: bfields@fieldses.org, trond.myklebust@netapp.com,
dan.carpenter@oracle.com, linux-nfs@vger.kernel.org,
steved@redhat.com
Subject: Re: [PATCH] svcrdma: Cleanup sparse warnings in the svcrdma module
Date: Tue, 14 Feb 2012 23:23:42 +0000 [thread overview]
Message-ID: <20120214232342.GB23916@ZenIV.linux.org.uk> (raw)
In-Reply-To: <1329260485-16994-1-git-send-email-tom@ogc.us>
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?
next prev parent reply other threads:[~2012-02-14 23:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-14 23:01 [PATCH] svcrdma: Cleanup sparse warnings in the svcrdma module Tom Tucker
2012-02-14 23:23 ` Al Viro [this message]
2012-02-15 16:16 ` J. Bruce Fields
2012-02-15 17:09 ` Tom Tucker
2012-02-15 19:03 ` J. Bruce Fields
2012-02-15 17:25 ` [PATCHv2] " Tom Tucker
2012-02-15 17:31 ` Tom Tucker
2012-02-15 17:30 ` [PATCHv3] " Tom Tucker
2012-02-17 22:01 ` J. Bruce Fields
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120214232342.GB23916@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=bfields@fieldses.org \
--cc=dan.carpenter@oracle.com \
--cc=linux-nfs@vger.kernel.org \
--cc=steved@redhat.com \
--cc=tom@ogc.us \
--cc=trond.myklebust@netapp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.