Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp179459yba; Thu, 2 May 2019 23:02:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqxrZzyWTQ9qsw5ZHbwERDLu+JOi9n1Jv1QKvLu9Po/b6jMf1kVm/KvxVjgyysk3C/cjrzbl X-Received: by 2002:aa7:8851:: with SMTP id k17mr8372385pfo.121.1556863358722; Thu, 02 May 2019 23:02:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556863358; cv=none; d=google.com; s=arc-20160816; b=Tc9UKRoVf41acefAl6+eSjYMB31SDH+ALFp9uU7zhJ/P/6T0OzFqW5QHg172Q3k3gJ rA044MSu3xhWWh0pXswZgMqD2mvDbmt/tr3J+2/qFLt7e0CWPiiM2j4LXMzpncfcq4mh GpjngHIKfnxOMTNNOvxLxP8YZMS2wmevTjA1QGQmjRx9D/5KpJaiB559fjHYoAcXEhvo b8lQbkB6AUrG7xqxxwK6HGuX55CGuOcKnC/rr7aBffyL11JEDMlFFFE4x/X+rr3aWyYh blSAIJLu5WWgd3LPEwvvj9Mv6a5aNnptZ44wfp/B7SIqaOM4RWQ69M/WXsLn2aOUsQIX WMTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=b+00Xez4VVqvi11sX2TSXpfIJgpjwEvl8UnGe/5MG3c=; b=mKxXrr4HjJ5AqZqcFQbZrn5vPBHBhjajlXRXaDpEUJNfqsDFISKTEiVavDmFG2XFUE 7JiTOP4itGnypkyf4Yg/Ta+2nlvEIREHXIdKJAuIaGURmnYjYyYHdhJ7e1FRUpGAON7v arNBV5GZjvpy6fLf0/4hWKVS3f1AQUeLi+NnrlzrwDK6FoRdpTPucxQr9j11HC57G9AR ZEpA0DDtxZu5sRnjlw3MdNXOoS1JojameJs1ycJs8yE8AgWB4gEcYHN337OAGj60rUye jmjwmUOKZ5GM7k3CpAFjvZrr+Wh3t0Tuud3P6T8Dk2Cqw4st1AAp3zXioikDOdCwJNYY I3Kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=eeMhrqL1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x1si1263722pfo.49.2019.05.02.23.02.22; Thu, 02 May 2019 23:02:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=eeMhrqL1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726596AbfECGBA (ORCPT + 99 others); Fri, 3 May 2019 02:01:00 -0400 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:50798 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725794AbfECGBA (ORCPT ); Fri, 3 May 2019 02:01:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=b+00Xez4VVqvi11sX2TSXpfIJgpjwEvl8UnGe/5MG3c=; b=eeMhrqL1edD4BmDM+M2z7gyso TcGG1Ud//m2wYJB9GDY2Zk1BXBLfwBVREENjIqVoftX5U0QtHlAMKZzCVIN/eTNMmxqIKt03OiDUs zgJGJZhK5Zx2ZoVmnuJcXcMAdPm469jHejXJe7F+zmBjHaaXLUQr5LYUpjXDzrKq6wnQI=; Received: from [42.29.24.106] (helo=finisterre.ee.mobilebroadband) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hMRFR-0000RO-SJ; Fri, 03 May 2019 06:00:42 +0000 Received: by finisterre.ee.mobilebroadband (Postfix, from userid 1000) id 866E1441D3C; Fri, 3 May 2019 07:00:34 +0100 (BST) Date: Fri, 3 May 2019 15:00:34 +0900 From: Mark Brown To: Fabien Parent Cc: lgirdwood@gmail.com, robh+dt@kernel.org, mark.rutland@arm.com, matthias.bgg@gmail.com, perex@perex.cz, tiwai@suse.com, kaichieh.chuang@mediatek.com, shunli.wang@mediatek.com, alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 4/5] ASoC: mediatek: mt8516: Add ADDA DAI driver Message-ID: <20190503060034.GD14916@sirena.org.uk> References: <20190502121041.8045-1-fparent@baylibre.com> <20190502121041.8045-5-fparent@baylibre.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="/EQiL+SffV/fXkvV" Content-Disposition: inline In-Reply-To: <20190502121041.8045-5-fparent@baylibre.com> X-Cookie: -- I have seen the FUN -- User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --/EQiL+SffV/fXkvV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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. --/EQiL+SffV/fXkvV Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlzL2QEACgkQJNaLcl1U h9CnBQf+I75JGpPa7HZs9a5wiVauteNssp4QFPfRbk8PmvqiqEycEs+1ykqmWwhK K7c2GX0MELLAlaU9UmlelicrJB5+xaGGOAUFl5CVnVt9zxLdrXPvfeet/dK9FBtY Vpjh1BVvkUYgD9gz/u2sRgOtysfwQzfB17Uh3GtNHfoofg4Fhi/MqevPdkDyRf00 ZelGCTTFYLeFLm66hzyjZHfGPlRBTG1G7IcNJ/mRgGg7Asc2LaxhauBM0nLTqANG H5t9WOoaoIbQy2JDR0PCw22mB0gE+tY7gkMZZy3NWxnzZk4uNTgR5Me2P/vly6Bc x6jXh8xYjanv7sdTg/r/in0JXtVYTA== =rEDi -----END PGP SIGNATURE----- --/EQiL+SffV/fXkvV--