From patchwork Tue Aug 28 21:42:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kirill Marinushkin X-Patchwork-Id: 10579205 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4ECE113B8 for ; Tue, 28 Aug 2018 21:42:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 438422ACDA for ; Tue, 28 Aug 2018 21:42:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 341622AD01; Tue, 28 Aug 2018 21:42:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E95E92ACDA for ; Tue, 28 Aug 2018 21:42:13 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 5493F26781F; Tue, 28 Aug 2018 23:42:11 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id BAC462678BA; Tue, 28 Aug 2018 23:42:08 +0200 (CEST) Received: from host.euro-space.net (host.euro-space.net [87.117.239.2]) by alsa0.perex.cz (Postfix) with ESMTP id 731AD26779D for ; Tue, 28 Aug 2018 23:42:06 +0200 (CEST) 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=OXN7eFTN3RfuR3y3CCBS3jV78rIhRUEtx6L4PzVtbW8=; b=ZVeDfo82zMDbxF//vXyvbpTAPj T/SaWuhwr4JT/Rfwj+gabFt8vkT8Oim7YqIRboIqB3GUmv4HUQwO9cYwESHHubhfm44GFicuYMOKH S8ZIkdAJH/fz1QoQmw1dSlOp+mAaKidhsGzP2dFXKvy4karM5i4xFKV7MQi5KGPEMynd0YS6D3TZQ 9tF9PLH15eHAr+ff2oS28yRJ4ImXvyGalVF+3pTb2qGYoXof8WPxx4y3e4ghF1HgLnbB5PgUAfS0V U1Lr1+LLj01DHKF8OGDAsq8z6GNvyQ5+z6NZbxoewbx2F0cH00OerGbgw2/+bKC4WOop9rUemg6M1 ZLvOVwAQ==; 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 1fulkS-00052G-B2; Tue, 28 Aug 2018 22:42:04 +0100 From: Kirill Marinushkin To: Mark Brown Date: Tue, 28 Aug 2018 23:42:30 +0200 Message-Id: <20180828214231.10164-1-kmarinushkin@birdec.tech> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20180828194045.GQ2414@sirena.org.uk> References: <20180828194045.GQ2414@sirena.org.uk> 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 - alsa-project.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: Cc: alsa-devel@alsa-project.org, Kirill Marinushkin , linux-kernel@vger.kernel.org, Takashi Iwai , Liam Girdwood , Peter Ujfalusi , Vishwas A Deshpande , M R Swami Reddy , Kevin Cernekee Subject: [alsa-devel] [PATCH 1/2] ASoC: pcm3060: Improve stylistics of file comments X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Modified the complete file comments in C++ style, to make them look more intentional Signed-off-by: Kirill Marinushkin Cc: Mark Brown Cc: alsa-devel@alsa-project.org Cc: linux-kernel@vger.kernel.org --- sound/soc/codecs/pcm3060-i2c.c | 9 ++++----- sound/soc/codecs/pcm3060-spi.c | 9 ++++----- sound/soc/codecs/pcm3060.c | 9 ++++----- 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/sound/soc/codecs/pcm3060-i2c.c b/sound/soc/codecs/pcm3060-i2c.c index 03d2b4323626..cdc8314882bc 100644 --- a/sound/soc/codecs/pcm3060-i2c.c +++ b/sound/soc/codecs/pcm3060-i2c.c @@ -1,9 +1,8 @@ // SPDX-License-Identifier: GPL-2.0 -/* - * PCM3060 I2C driver - * - * Copyright (C) 2018 Kirill Marinushkin - */ +// +// PCM3060 I2C driver +// +// Copyright (C) 2018 Kirill Marinushkin #include #include diff --git a/sound/soc/codecs/pcm3060-spi.c b/sound/soc/codecs/pcm3060-spi.c index 8961e095ae73..f6f19fa80932 100644 --- a/sound/soc/codecs/pcm3060-spi.c +++ b/sound/soc/codecs/pcm3060-spi.c @@ -1,9 +1,8 @@ // SPDX-License-Identifier: GPL-2.0 -/* - * PCM3060 SPI driver - * - * Copyright (C) 2018 Kirill Marinushkin - */ +// +// PCM3060 SPI driver +// +// Copyright (C) 2018 Kirill Marinushkin #include #include diff --git a/sound/soc/codecs/pcm3060.c b/sound/soc/codecs/pcm3060.c index ef7c627c9ac5..5b9718fa766d 100644 --- a/sound/soc/codecs/pcm3060.c +++ b/sound/soc/codecs/pcm3060.c @@ -1,9 +1,8 @@ // SPDX-License-Identifier: GPL-2.0 -/* - * PCM3060 codec driver - * - * Copyright (C) 2018 Kirill Marinushkin - */ +// +// PCM3060 codec driver +// +// Copyright (C) 2018 Kirill Marinushkin #include #include From patchwork Tue Aug 28 21:42:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kirill Marinushkin X-Patchwork-Id: 10579207 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DC66613B8 for ; Tue, 28 Aug 2018 21:42:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D456E2ACFA for ; Tue, 28 Aug 2018 21:42:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C8C892AD15; Tue, 28 Aug 2018 21:42:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 35DFF2ACFA for ; Tue, 28 Aug 2018 21:42:21 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id C1D972678EE; Tue, 28 Aug 2018 23:42:19 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 7174A2678D5; Tue, 28 Aug 2018 23:42:17 +0200 (CEST) Received: from host.euro-space.net (host.euro-space.net [87.117.239.2]) by alsa0.perex.cz (Postfix) with ESMTP id 752022678EE for ; Tue, 28 Aug 2018 23:42:14 +0200 (CEST) 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 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 - alsa-project.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: Cc: alsa-devel@alsa-project.org, Kirill Marinushkin , linux-kernel@vger.kernel.org, Takashi Iwai , Liam Girdwood , Peter Ujfalusi , Vishwas A Deshpande , M R Swami Reddy , Kevin Cernekee Subject: [alsa-devel] [PATCH 2/2] ASoC: pcm3060: Improve legibility of if-statements X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP 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);