[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201010191921.21007.arnd@arndb.de>
Date: Tue, 19 Oct 2010 19:21:20 +0200
From: Arnd Bergmann <arnd@...db.de>
To: "Ohad Ben-Cohen" <ohad@...ery.com>
Cc: linux-omap@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, akpm@...ux-foundation.org,
Greg KH <greg@...ah.com>, Tony Lindgren <tony@...mide.com>,
Benoit Cousson <b-cousson@...com>,
Grant Likely <grant.likely@...retlab.ca>,
Hari Kanigeri <h-kanigeri2@...com>, Suman Anna <s-anna@...com>,
Simon Que <sque@...com>,
"Krishnamoorthy, Balaji T" <balajitk@...com>
Subject: Re: [PATCH 1/3] drivers: misc: add omap_hwspinlock driver
On Monday 18 October 2010 09:44:33 Ohad Ben-Cohen wrote:
> + int omap_hwspin_lock(struct omap_hwspinlock *hwlock, unsigned long *flags);
> ...
> + The flags parameter is a pointer to where the interrupts state of the
> + caller will be saved at.
This seems to encourage sloppy coding: The only variant you allow is the one
that corresponds to Linux's spin_lock_irqsave(), which is generally discouraged
in all places where you know if you need to disable interrupts or not.
IMHO the default should be a version that only allows locks that don't get
taken at IRQ time and consequently don't require saving the interrupt flags.
Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists