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

_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to