From: Dan Carpenter <dan.carpenter@oracle.com>
To: Eric Rost <eric.rost@mybabylon.net>
Cc: gregkh@linuxfoundation.org, jason@lakedaemon.net, jake@lwn.net,
antonysaraev@gmail.com, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/2] staging: skein: Adds CryptoAPI Support
Date: Fri, 24 Oct 2014 07:51:54 +0300 [thread overview]
Message-ID: <20141024045154.GS23154@mwanda> (raw)
In-Reply-To: <27089a0e5718341c7d1e7c6b21128d8db9237405.1414102205.git.eric.rost@mybabylon.net>
First of all this patch does too many things at once. Collapsing files
and deleting them needs to be done in separate patches from adding them.
There is the "one thing per patch" and each one of those is a separate
thing.
On Thu, Oct 23, 2014 at 05:12:10PM -0500, Eric Rost wrote:
> +int skein256_update(struct shash_desc *desc, const u8 *data,
> + unsigned int len)
> +{
> + return skein_256_update((struct skein_256_ctx *) shash_desc_ctx(desc),
> + data, (size_t) len);
> +}
The two line version of this cast was prettier. Also if you run
checkpatch.pl --strict over this it will hopefully warn about the
space in the middle of the cast and the alignment of data. Also the
cast to size_t is superflous.
The checkpatch --strict version of this looks like:
int skein256_update(struct shash_desc *desc, const u8 *data,
unsigned int len)
{
return skein_256_update((struct skein_256_ctx *)shash_desc_ctx(desc),
data, len);
}
Eventually, I feel like we would wave skein_256_update() to just take
a shash_desc pointer? We'd have to shuffle the skein_ctx struct a bit
to make that work. (I haven't looked at this carefully).
regards,
dan carpenter
next prev parent reply other threads:[~2014-10-24 4:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-23 22:11 [PATCH v3 0/2] staging: skein: Adds CryptoAPI and Module Support Eric Rost
2014-10-23 22:12 ` [PATCH v3 1/2] staging: skein: Adds CryptoAPI Support Eric Rost
2014-10-24 4:51 ` Dan Carpenter [this message]
2014-10-23 22:12 ` [PATCH v3 2/2] staging: skein: Adds Loadable Module Support Eric Rost
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=20141024045154.GS23154@mwanda \
--to=dan.carpenter@oracle.com \
--cc=antonysaraev@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=eric.rost@mybabylon.net \
--cc=gregkh@linuxfoundation.org \
--cc=jake@lwn.net \
--cc=jason@lakedaemon.net \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox