Re: [PATCH] ASoC: fsl_sai: Fix incorrect condition check in trigger()

2014-04-14 Thread Nicolin Chen
On Mon, Apr 14, 2014 at 09:31:26PM +0100, Mark Brown wrote:
> On Fri, Apr 11, 2014 at 10:10:00PM +0800, Nicolin Chen wrote:
> 
> > +   /* Check if the opposite FRDE is also disabled */
> > +   if (!(tx ? rcsr & FSL_SAI_CSR_FRDE : tcsr & FSL_SAI_CSR_FRDE)) {
> 
> I've applied this since it's a fix but this is *not* a triumph of
> legibility, the ternery operator is often not helpful.

It looks like I've got a bad habit again. I'll be careful next time.

Thank you for reminding me,
Nicolin

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] ASoC: fsl_sai: Fix incorrect condition check in trigger()

2014-04-14 Thread Mark Brown
On Fri, Apr 11, 2014 at 10:10:00PM +0800, Nicolin Chen wrote:

> + /* Check if the opposite FRDE is also disabled */
> + if (!(tx ? rcsr & FSL_SAI_CSR_FRDE : tcsr & FSL_SAI_CSR_FRDE)) {

I've applied this since it's a fix but this is *not* a triumph of
legibility, the ternery operator is often not helpful.


signature.asc
Description: Digital signature


Re: [PATCH] ASoC: fsl_sai: Fix incorrect condition check in trigger()

2014-04-14 Thread Nicolin Chen
On Mon, Apr 14, 2014 at 09:31:26PM +0100, Mark Brown wrote:
 On Fri, Apr 11, 2014 at 10:10:00PM +0800, Nicolin Chen wrote:
 
  +   /* Check if the opposite FRDE is also disabled */
  +   if (!(tx ? rcsr  FSL_SAI_CSR_FRDE : tcsr  FSL_SAI_CSR_FRDE)) {
 
 I've applied this since it's a fix but this is *not* a triumph of
 legibility, the ternery operator is often not helpful.

It looks like I've got a bad habit again. I'll be careful next time.

Thank you for reminding me,
Nicolin

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] ASoC: fsl_sai: Fix incorrect condition check in trigger()

2014-04-14 Thread Mark Brown
On Fri, Apr 11, 2014 at 10:10:00PM +0800, Nicolin Chen wrote:

 + /* Check if the opposite FRDE is also disabled */
 + if (!(tx ? rcsr  FSL_SAI_CSR_FRDE : tcsr  FSL_SAI_CSR_FRDE)) {

I've applied this since it's a fix but this is *not* a triumph of
legibility, the ternery operator is often not helpful.


signature.asc
Description: Digital signature