From: Andrew Morton <akpm@linux-foundation.org>
To: Jean Delvare <khali@linux-fr.org>
Cc: Andrew Chew <achew@nvidia.com>,
linux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org,
alan@linux.intel.com, olof@lixom.net
Subject: Re: [PATCH 1/1] drivers/misc/akm8975: Add compass sensor driver
Date: Fri, 27 Aug 2010 00:24:39 -0700 [thread overview]
Message-ID: <20100827002439.8e8df11b.akpm@linux-foundation.org> (raw)
In-Reply-To: <20100827091607.1bb889f2@hyperion.delvare>
On Fri, 27 Aug 2010 09:16:07 +0200 Jean Delvare <khali@linux-fr.org> wrote:
> > +static int akm_aot_open(struct inode *inode, struct file *file)
> > +{
> > + int ret = -1;
>
> Useless and dangerous initialization.
>
> > +
> > + FUNCDBG("called");
> > + if (atomic_cmpxchg(&open_flag, 0, 1) == 0) {
> > + wake_up(&open_wq);
> > + ret = 0;
this doesn't do anything either.
> > + }
> > +
> > + ret = nonseekable_open(inode, file);
> > + if (ret)
> > + return ret;
> > +
> > + file->private_data = akmd_data;
> > +
> > + return ret;
> > +}
prev parent reply other threads:[~2010-08-27 7:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1282872717-12228-1-git-send-email-achew@nvidia.com>
2010-08-27 7:16 ` Jean Delvare
2010-08-27 7:24 ` Andrew Morton [this message]
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=20100827002439.8e8df11b.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=achew@nvidia.com \
--cc=alan@linux.intel.com \
--cc=khali@linux-fr.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=olof@lixom.net \
/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
all inboxes | Powered by JetHome®