lkml.org 
[lkml]   [2019]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/5] ASoC: mediatek: mt8516: Add ADDA DAI driver
On Thu, May 02, 2019 at 02:10:40PM +0200, Fabien Parent wrote:

> +static int mt8516_afe_adda_hw_params(struct snd_pcm_substream *substream,
> + struct snd_pcm_hw_params *params,
> + struct snd_soc_dai *dai)
> +{
> + struct mtk_base_afe *afe = snd_soc_dai_get_drvdata(dai);
> + unsigned int width_val = params_width(params) > 16 ?
> + (AFE_CONN_24BIT_O03 | AFE_CONN_24BIT_O04) : 0;

Please write normal conditional statements rather than burying things in
the variable declarations usin the ternery operator, it makes things
much more legible.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2019-05-03 08:02    [W:0.096 / U:3.828 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site