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

Robert Jarzmik robert.jarzmik at free.fr
Wed Mar 21 16:24:14 EDT 2012


Artem Bityutskiy <dedekind1 at gmail.com> writes:

> 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.
OK for V2.

I'll await comments for 3 or 4 days before releasing V2.

Cheers.

-- 
Robert



More information about the linux-mtd mailing list