Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2760imm; Tue, 28 Aug 2018 14:44:42 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYB/ldEIcqrInDVm+ZIhwYq+N3/4K/jmreL6aAysf0WHU8QxShiekXevi+22if2nQCPMfsV X-Received: by 2002:a17:902:b70f:: with SMTP id d15-v6mr3282995pls.53.1535492682713; Tue, 28 Aug 2018 14:44:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535492682; cv=none; d=google.com; s=arc-20160816; b=MvedpDbgYcp/TcfIksAEMaY42rPZx+FB45q0FOqkFBUR8zuHVD2maOJT1HRPonyhan XMzE3UjYN70UHSFA5Ujt2l/D5vVbxF2Isd9Dvz4awJUuuN4b8axQh1FEHU4CrZDIrTev b5Q6zRtyA7zKGtG4mhDjyF9lw5xTIzALY/FhnpO8+E4DOrxja6DVPEvl9Vp8uU1Nyaaf Ybxx3iFGvEtZP2W9dao2Irg9mXojRVefkKDEVnF4mZXlMzvdibBFimOwvX7QJw+FaPzv 7e4tWM86lTE/nMqKRYMqQMU0cehycDA0BvulW6OBBHFQ3i+u9L3FxGYZOB9sN1Q9foWs gHXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=a2yC7/xN5e6r2EKsm4v+K36IC7YFL66cp1N1jflwIj8=; b=BMPuX+3r9G2/e8OKWA56tcVzJQwn4eCOGokAQwhPf/vOSi+2mdy52gO/1uO7wRdTho oS0dQxgVVti6Z6MBDMU1S1jB6ARE4lKYo6CVYWmC3B+OkxqeC7XbHHXN66ooyKIty89C HWp6n6OlQO/1NhSBanEqIQloCUrD8bv501zQSWnr+Q6sBDCC/EdaQMIENw0bXXmNVkyM lyaVj3VrA6qbH3zrXHqu5rqRX0TZ/b8vDyOl1hur0lvjvajwzvyelR0m9qXIpzvkk2U0 50pjnISSNZkbp/n0yioG9jz4onLlsBVkA5IjnMRn0JbpQYuF2VDQrdJkaH59cFxYNlqz lP/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@birdec.tech header.s=default header.b=nQfktLIu; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z66-v6si2006352pfl.209.2018.08.28.14.44.27; Tue, 28 Aug 2018 14:44:42 -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=@birdec.tech header.s=default header.b=nQfktLIu; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727444AbeH2Bfu (ORCPT + 99 others); Tue, 28 Aug 2018 21:35:50 -0400 Received: from host.euro-space.net ([87.117.239.2]:42720 "EHLO host.euro-space.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726998AbeH2Bfu (ORCPT ); Tue, 28 Aug 2018 21:35:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=birdec.tech ; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type: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=a2yC7/xN5e6r2EKsm4v+K36IC7YFL66cp1N1jflwIj8=; b=nQfktLIu2+w3XWtBEaVP0HVtKr CMrFVh+CWoUXlNTxzuPP5LhX8W28T3caApWyG0mvuphRBLRxCCMt3o5aiC8F4Y6pjTWbcs8I3QwZb lZSzAOY72W1Kgw38tQhcw6cuXF8BZBOBM64sLtr9uhRbYFND/jMExCvsR9wA7hRE5mgUVG63U3FTi cVWxwpHzZGo40X6kd3M/5n04Evdetx8pwAqnw082+cIwea6JoKGmvLh3LXYMTLejOyqF8L5F7yYmT UkXRs7s+mBGFDl9L5qpaGbICsbtZNLPIkw5FYNSMxcY+LB3W1K0WSG8cGJ2wlBWjvX9vR+ockSZ/0 Oux0Amfw==; Received: from x55b35620.dyn.telefonica.de ([85.179.86.32]:36818 helo=gentoo0.localdomain) by host.euro-space.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.91) (envelope-from ) id 1fulkZ-00052G-Ib; Tue, 28 Aug 2018 22:42:11 +0100 From: Kirill Marinushkin To: Mark Brown Cc: Liam Girdwood , Jaroslav Kysela , Takashi Iwai , M R Swami Reddy , Vishwas A Deshpande , Kevin Cernekee , Peter Ujfalusi , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Kirill Marinushkin Subject: [PATCH 2/2] ASoC: pcm3060: Improve legibility of if-statements Date: Tue, 28 Aug 2018 23:42:31 +0200 Message-Id: <20180828214231.10164-2-kmarinushkin@birdec.tech> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180828214231.10164-1-kmarinushkin@birdec.tech> References: <20180828194045.GQ2414@sirena.org.uk> <20180828214231.10164-1-kmarinushkin@birdec.tech> X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - host.euro-space.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - birdec.tech X-Get-Message-Sender-Via: host.euro-space.net: authenticated_id: kmarinushkin@birdec.tech X-Authenticated-Sender: host.euro-space.net: kmarinushkin@birdec.tech X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Modified some if-statements to make them more clear Signed-off-by: Kirill Marinushkin Cc: Mark Brown Cc: alsa-devel@alsa-project.org Cc: linux-kernel@vger.kernel.org --- sound/soc/codecs/pcm3060.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/pcm3060.c b/sound/soc/codecs/pcm3060.c index 5b9718fa766d..494d9d662be8 100644 --- a/sound/soc/codecs/pcm3060.c +++ b/sound/soc/codecs/pcm3060.c @@ -68,7 +68,10 @@ static int pcm3060_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) return -EINVAL; } - reg = (dai->id == PCM3060_DAI_ID_DAC ? PCM3060_REG67 : PCM3060_REG72); + if (dai->id == PCM3060_DAI_ID_DAC) + reg = PCM3060_REG67; + else + reg = PCM3060_REG72; regmap_update_bits(priv->regmap, reg, PCM3060_REG_MASK_FMT, val); @@ -124,7 +127,10 @@ static int pcm3060_hw_params(struct snd_pcm_substream *substream, } val_ready: - reg = (dai->id == PCM3060_DAI_ID_DAC ? PCM3060_REG67 : PCM3060_REG72); + if (dai->id == PCM3060_DAI_ID_DAC) + reg = PCM3060_REG67; + else + reg = PCM3060_REG72; regmap_update_bits(priv->regmap, reg, PCM3060_REG_MASK_MS, val); -- 2.13.6