[PATCH 4/4] drivers/mtd: docg3 add protection against concurrency

Artem Bityutskiy dedekind1 at gmail.com
Tue Mar 20 07:42:29 EDT 2012


On Mon, 2012-03-19 at 23:32 +0100, Robert Jarzmik wrote:
> +static void cascade_lock(struct docg3 *docg3)
> +{
> +	mutex_lock(&docg3->cascade->lock);
> +}
> +
> +static void cascade_unlock(struct docg3 *docg3)
> +{
> +	mutex_unlock(&docg3->cascade->lock);
> +}

Please, do not introduce that trivial wrappers - they are useless and
only hurt readability. Open-coded mutex_lock()/mutex_unlock() is more
readable.

-- 
Best Regards,
Artem Bityutskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20120320/69a9f155/attachment.sig>


More information about the linux-mtd mailing list