public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Artem Bityutskiy <dedekind1@gmail.com>
To: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: linux-mtd@lists.infradead.org
Subject: Re: [PATCH 4/4] drivers/mtd: docg3 add protection against concurrency
Date: Tue, 20 Mar 2012 13:42:29 +0200	[thread overview]
Message-ID: <1332243749.11468.21.camel@sauron.fi.intel.com> (raw)
In-Reply-To: <1332196342-21545-5-git-send-email-robert.jarzmik@free.fr>

[-- Attachment #1: Type: text/plain, Size: 466 bytes --]

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

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2012-03-20 11:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-19 22:32 [PATCH 0/4] Fixes for docg3 to enable ubifs over docg3 Robert Jarzmik
2012-03-19 22:32 ` [PATCH 1/4] drivers/mtd: docg3 fix inbound calculations Robert Jarzmik
2012-03-19 22:32 ` [PATCH 2/4] drivers/mtd: docg3 increase write/erase timeout Robert Jarzmik
2012-03-19 22:32 ` [PATCH 3/4] drivers/mtd: docg3 refactor cascade floors structure Robert Jarzmik
2012-03-19 22:32 ` [PATCH 4/4] drivers/mtd: docg3 add protection against concurrency Robert Jarzmik
2012-03-20 11:42   ` Artem Bityutskiy [this message]
2012-03-21 20:24     ` Robert Jarzmik
2012-03-22 11:48       ` Artem Bityutskiy
2012-03-22 20:01         ` Robert Jarzmik

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=1332243749.11468.21.camel@sauron.fi.intel.com \
    --to=dedekind1@gmail.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=robert.jarzmik@free.fr \
    /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