From: Andrew Morton <akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
To: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
Cc: Andrew Chew <achew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
alan-VuQAYsv1563Yd54FQh9/CA@public.gmane.org,
olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org
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-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
On Fri, 27 Aug 2010 09:16:07 +0200 Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.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:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-27 1:31 [PATCH 1/1] drivers/misc/akm8975: Add compass sensor driver Andrew-u79uwXL29TY76Z2rM5mHXA, Chew-u79uwXL29TY76Z2rM5mHXA
[not found] ` <1282872717-12228-1-git-send-email-achew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2010-08-27 2:10 ` Andrew Morton
[not found] ` <20100826191037.abdf65e5.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2010-08-27 2:10 ` Andrew Chew
[not found] ` <643E69AA4436674C8F39DCC2C05F763816B7C05787-lR+7xdUAJVNDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2010-08-27 10:03 ` Alan Cox
2010-08-27 6:16 ` Jean Delvare
2010-08-27 7:16 ` Jean Delvare
[not found] ` <20100827091607.1bb889f2-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
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-de/tnxtf+jlsfhdxvbkv3wd2fqjk+8+b@public.gmane.org \
--cc=achew-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=alan-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
--cc=khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org \
/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;
as well as URLs for NNTP newsgroup(s).