From: Thomas Gleixner <tglx@linutronix.de>
To: "TK, Pratheesh Gangadhar" <pratheesh@ti.com>
Cc: "Hans J. Koch" <hjk@hansjkoch.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"gregkh@suse.de" <gregkh@suse.de>,
"sshtylyov@mvista.com" <sshtylyov@mvista.com>,
"arnd@arndb.de" <arnd@arndb.de>,
"Chatterjee, Amit" <amit.chatterjee@ti.com>,
"davinci-linux-open-source@linux.davincidsp.com"
<davinci-linux-open-source@linux.davincidsp.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: RE: [PATCH v6 1/1] PRUSS UIO driver support
Date: Tue, 1 Mar 2011 22:38:10 +0100 (CET) [thread overview]
Message-ID: <alpine.LFD.2.00.1103012232220.2701@localhost6.localdomain6> (raw)
In-Reply-To: <B85A65D85D7EB246BE421B3FB0FBB593024BF36683@dbde02.ent.ti.com>
On Wed, 2 Mar 2011, TK, Pratheesh Gangadhar wrote:
> Hi,
> > -----Original Message-----
> > From: Hans J. Koch [mailto:hjk@hansjkoch.de]
> > Sent: Wednesday, March 02, 2011 12:04 AM
> > To: TK, Pratheesh Gangadhar
> > Cc: Hans J. Koch; linux-kernel@vger.kernel.org; gregkh@suse.de;
> > tglx@linutronix.de; sshtylyov@mvista.com; arnd@arndb.de; Chatterjee, Amit;
> > davinci-linux-open-source@linux.davincidsp.com; linux-arm-
> > kernel@lists.infradead.org
> > Subject: Re: [PATCH v6 1/1] PRUSS UIO driver support
Sigh, can you please use a mailer which does not repeat the headers
for no value and just has a single line like this:
> > On Tue, Mar 01, 2011 at 10:15:27AM +0530, TK, Pratheesh Gangadhar wrote:
> > Anyway, please don't use that kind of argumentation. The next newbie
> > developer might copy your work as a basis for his new driver, and there
> > it probably won't work.
> >
> > Simply put the spin_lock_init before the loop.
> >
> Agree, will fix this in next version.
As I said before, we want stuff initialized when it is possibly
used. But first of all we ant people to use the proper mechanisms to
achive that.
If that's a module global lock then it needs to be instantiated by
static DEFINE_SPINLOCK(lock);
which implies the initialization of the lock.
If it's a lock which is in allocated memory then the
spin_lock_init(&lock);
wants to be before it can be possibly used.
So in your case DEFINE_SPINLOCK is the correct solution.
Thanks,
tglx
next prev parent reply other threads:[~2011-03-01 21:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-28 21:01 [PATCH v6 0/1] Add " Pratheesh Gangadhar
2011-02-28 21:01 ` [PATCH v6 1/1] " Pratheesh Gangadhar
2011-02-28 21:26 ` Hans J. Koch
2011-03-01 4:45 ` TK, Pratheesh Gangadhar
2011-03-01 9:53 ` Thomas Gleixner
2011-03-01 18:33 ` Hans J. Koch
2011-03-01 21:19 ` TK, Pratheesh Gangadhar
2011-03-01 21:38 ` Thomas Gleixner [this message]
2011-03-01 9:51 ` Thomas Gleixner
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=alpine.LFD.2.00.1103012232220.2701@localhost6.localdomain6 \
--to=tglx@linutronix.de \
--cc=amit.chatterjee@ti.com \
--cc=arnd@arndb.de \
--cc=davinci-linux-open-source@linux.davincidsp.com \
--cc=gregkh@suse.de \
--cc=hjk@hansjkoch.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pratheesh@ti.com \
--cc=sshtylyov@mvista.com \
/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®