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

From: Yang, Wenyou
Date: Wed Apr 03 2013 - 01:10:37 EST


Hi, Mark,

> -----Original Message-----
> From: Mark Brown [mailto:broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx]
> Sent: 2013年4月1日 21:46
> To: Yang, Wenyou
> Cc: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx; grant.likely@xxxxxxxxxxxx;
> richard.genoud@xxxxxxxxx; plagnioj@xxxxxxxxxxxx; Ferre, Nicolas; Lin, JM;
> spi-devel-general@xxxxxxxxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx
> 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
㈤旃??????+-遍荻?w??笔???dz罐??骅w*jg??????/??罐????璀??摺?囤??????:+v???佶>W?贽i?xPj??? -?+?d?