RE: [PATCH v7 06/14] spi/spi-atmel: add flag to controller data for lock operations

Yang, Wenyou
2013-04-03T05:10:33Z

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="gb2312", Size: 1235 bytes --]

Hi, Mark,

> -----Original Message-----
> From: Mark Brown [mailto:broonie@opensource.wolfsonmicro.com]
> Sent: 2013Äê4ÔÂ1ÈÕ 21:46
> To: Yang, Wenyou
> Cc: linux-arm-kernel@lists.infradead.org; grant.likely@secretlab.ca;
> richard.genoud@gmail.com; plagnioj@jcrosoft.com; Ferre, Nicolas; Lin, JM;
> spi-devel-general@lists.sourceforge.net; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH v7 06/14] spi/spi-atmel: add flag to controller data for lock
> operations
>
> On Tue, Mar 19, 2013 at 03:46:03PM +0800, Wenyou Yang wrote:
>
> > +static void atmel_spi_lock(struct atmel_spi *as) {
> > + spin_lock_irqsave(&as->lock, as->flags); }
>
> Coding style.
I will change it in next version.

>
> > - spin_unlock(&as->lock);
> > + atmel_spi_unlock(as);
> > msg->complete(msg->context);
> > - spin_lock(&as->lock);
> > + atmel_spi_lock(as);
>
> This replaces non-irqsave versions with irqsave versions of the lock.
> Is this safe/correct? If it is I'd have expected some sort of mention of it in the
> commit log.
I will add some commit log.

Best Regards,
Wenyou Yang
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éÝ¶\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dÊ‡Ú™ë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥