From patchwork Mon Jul 25 13:09:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 12928048 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 310A6C43334 for ; Mon, 25 Jul 2022 13:08:10 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 0998EFA; Mon, 25 Jul 2022 15:07:18 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0998EFA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1658754488; bh=pfFlYQJ46XkjUNiMAdcxTdm9mH/GEjmoBFYjs3nO3f0=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=EcjhvNl7EelW2K8aQ2uyF3VPBJrfnL0+Ob3u4oqvzhuP/f+EWU61Sydxq8tnS/5PX CUAqbbuy6JjvhTnOYC6NHWS3oLg9HeifbJS+5mYWC8PeoAL0+wXFP5C4W7TvsyPXo8 zYXJ59rmbb/zR6p7CzyTKQjlZd8zVwyDy8Lyz9JY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 8A32CF80163; Mon, 25 Jul 2022 15:07:17 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 246ACF80088; Mon, 25 Jul 2022 15:07:16 +0200 (CEST) Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 36A8EF80088 for ; Mon, 25 Jul 2022 15:07:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 36A8EF80088 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="vOiSpwwQ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1658754431; x=1690290431; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=pfFlYQJ46XkjUNiMAdcxTdm9mH/GEjmoBFYjs3nO3f0=; b=vOiSpwwQgTFMk6IR+JeeKysnBURiJLwb1nKWOcnlX64r6gX5nIeoUkZ3 /PjxM/fvv6Ukbwe4fDHAbAZUo0+BJ+rTiILLQAdrOpLBI3AnR3ZjC0VMU yf6CV4BPetm/EO8VTJIlOqlknWUlZ89wXZL+AUUXbYRZVRQesM4HLb7LS dJVCE9vzmZY5j+z3oj9bd13VSQz4IY3J6PuwRCGc80kj4ezcLRbv9yGQ2 r7AKxiS8rJdjpSTJJ1T2qnGgYYYPZNH/yj6HFqXoL1QX0U1RoLeAwNPxM eoT6T+N7ocw5LMZGY0mMjDgKe/uQyjpxsE5K33UFVY/EC9285EFcrMGlj g==; X-IronPort-AV: E=Sophos;i="5.93,192,1654585200"; d="scan'208";a="173519274" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 25 Jul 2022 06:07:06 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Mon, 25 Jul 2022 06:07:04 -0700 Received: from localhost.localdomain (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Mon, 25 Jul 2022 06:07:02 -0700 From: Claudiu Beznea To: , , , , , Subject: [PATCH v2 1/5] ASoC: mchp-spdifrx: disable end of block interrupt on failures Date: Mon, 25 Jul 2022 16:09:21 +0300 Message-ID: <20220725130925.1781791-2-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220725130925.1781791-1-claudiu.beznea@microchip.com> References: <20220725130925.1781791-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Claudiu Beznea X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Disable end of block interrupt in case of wait for completion timeout or errors to undo previously enable operation (done in mchp_spdifrx_isr_blockend_en()). Otherwise we can end up with an unbalanced reference counter for this interrupt. Fixes: ef265c55c1ac ("ASoC: mchp-spdifrx: add driver for SPDIF RX") Signed-off-by: Claudiu Beznea --- sound/soc/atmel/mchp-spdifrx.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sound/soc/atmel/mchp-spdifrx.c b/sound/soc/atmel/mchp-spdifrx.c index 0d37b78b94a0..b6a753893d90 100644 --- a/sound/soc/atmel/mchp-spdifrx.c +++ b/sound/soc/atmel/mchp-spdifrx.c @@ -288,15 +288,17 @@ static void mchp_spdifrx_isr_blockend_en(struct mchp_spdifrx_dev *dev) spin_unlock_irqrestore(&dev->blockend_lock, flags); } -/* called from atomic context only */ +/* called from atomic/non-atomic context */ static void mchp_spdifrx_isr_blockend_dis(struct mchp_spdifrx_dev *dev) { - spin_lock(&dev->blockend_lock); + unsigned int flags; + + spin_lock_irqsave(&dev->blockend_lock); dev->blockend_refcount--; /* don't enable BLOCKEND interrupt if it's already enabled */ if (dev->blockend_refcount == 0) regmap_write(dev->regmap, SPDIFRX_IDR, SPDIFRX_IR_BLOCKEND); - spin_unlock(&dev->blockend_lock); + spin_unlock_irqrestore(&dev->blockend_lock); } static irqreturn_t mchp_spdif_interrupt(int irq, void *dev_id) @@ -575,6 +577,7 @@ static int mchp_spdifrx_subcode_ch_get(struct mchp_spdifrx_dev *dev, if (ret <= 0) { dev_dbg(dev->dev, "user data for channel %d timeout\n", channel); + mchp_spdifrx_isr_blockend_dis(dev); return ret; } From patchwork Mon Jul 25 13:09:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 12928049 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 397D9C433EF for ; Mon, 25 Jul 2022 13:08:39 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 08B4083B; Mon, 25 Jul 2022 15:07:47 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 08B4083B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1658754517; bh=7eNUHi9m1jTYNb6cRhRIgN0JdTON6pZLix7RTM4B5OU=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=JLZYJG/kj8tsJWNonrxBdzlZC65GjJuk6EunMJDqs8pQgKIuY+X5dNv2+jcsq0fA4 Dadqy9spOeFmZYC9JBzobmZFD3CFoGDkD67zhaM5Y0w31R2ReSc3DLg5VyzJS31nR9 C9Iqudq5mlVqCtEi6lPUExFayiWm/npWYX8Q6pz4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 36141F80212; Mon, 25 Jul 2022 15:07:22 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5B244F80212; Mon, 25 Jul 2022 15:07:20 +0200 (CEST) Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id DA309F80115 for ; Mon, 25 Jul 2022 15:07:09 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz DA309F80115 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="fr4pKhTM" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1658754436; x=1690290436; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7eNUHi9m1jTYNb6cRhRIgN0JdTON6pZLix7RTM4B5OU=; b=fr4pKhTM2FdSvvgnEPuXcjEQLmNBmaxYS7oxLilebUbDgeAEEbhnosAS m8cVV6FWbcyPEYLeiUMpFJzVzYzyaFjErz4cubVtPPLBMGwVG2GtN2ehZ 7uIPPtuifzO8l+cZCtczS7o+0I4PaJx2el4CkfCwE82XDXUShLfZxlbuq JJABWZwG8Qb9Jld7f5M4DYT7XBFzAKY8N1WDBbqpEnYbg3NurFeUiOl+u 01aTbMItJ1qc8HRIaplyiab3ELfltG5zi9X0nDlvmbqq9wiiYTT/eSdwt y/PW+eciTsalAoikxssGy9h5JJ6l6lyypdJ083yn4LIGE7kZ64z+WrjrA A==; X-IronPort-AV: E=Sophos;i="5.93,192,1654585200"; d="scan'208";a="173519302" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 25 Jul 2022 06:07:09 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Mon, 25 Jul 2022 06:07:07 -0700 Received: from localhost.localdomain (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Mon, 25 Jul 2022 06:07:05 -0700 From: Claudiu Beznea To: , , , , , Subject: [PATCH v2 2/5] ASoC: mchp-spdifrx: use single tab indent for structure Date: Mon, 25 Jul 2022 16:09:22 +0300 Message-ID: <20220725130925.1781791-3-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220725130925.1781791-1-claudiu.beznea@microchip.com> References: <20220725130925.1781791-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Claudiu Beznea X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Use single tab indentation for mchp_spdifrx_mixer_control structure. Signed-off-by: Claudiu Beznea --- sound/soc/atmel/mchp-spdifrx.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sound/soc/atmel/mchp-spdifrx.c b/sound/soc/atmel/mchp-spdifrx.c index b6a753893d90..fcc5ca865d81 100644 --- a/sound/soc/atmel/mchp-spdifrx.c +++ b/sound/soc/atmel/mchp-spdifrx.c @@ -221,11 +221,11 @@ struct mchp_spdifrx_user_data { }; struct mchp_spdifrx_mixer_control { - struct mchp_spdifrx_ch_stat ch_stat[SPDIFRX_CHANNELS]; - struct mchp_spdifrx_user_data user_data[SPDIFRX_CHANNELS]; - bool ulock; - bool badf; - bool signal; + struct mchp_spdifrx_ch_stat ch_stat[SPDIFRX_CHANNELS]; + struct mchp_spdifrx_user_data user_data[SPDIFRX_CHANNELS]; + bool ulock; + bool badf; + bool signal; }; struct mchp_spdifrx_dev { From patchwork Mon Jul 25 13:09:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 12928051 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E386BC43334 for ; Mon, 25 Jul 2022 13:09:10 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 1B913847; Mon, 25 Jul 2022 15:08:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1B913847 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1658754549; bh=YaWb7yZxkGG+zBnJL2IFm2f4uUx2GkI4cjt6VNqnQM4=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=BmXKtKB1YKLLhB4QG1yyoZF5Zeagopeqvipg5Xw8oC87lgX8ZHxU9f6oZWfrySeCZ urMN1C5biF+y5tXcGrdSBrrMbDRbyIhBBkeCGLTezJeh52M1TeLolmuyZFD0FXQe9o IvVwT54sfOOrK7V38NFLFOtpqx96RCXiQCxjGjwE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 76800F80549; Mon, 25 Jul 2022 15:07:27 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 798F1F8054A; Mon, 25 Jul 2022 15:07:25 +0200 (CEST) Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id DF476F80088 for ; Mon, 25 Jul 2022 15:07:18 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz DF476F80088 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="THHciaFR" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1658754441; x=1690290441; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=YaWb7yZxkGG+zBnJL2IFm2f4uUx2GkI4cjt6VNqnQM4=; b=THHciaFRMGDenwvvJ9tPuzOtjBOwfUEwrsDXXEIy7TZ8nUl7om53UoJc q/hxX+fHxyGn0lpc72bBnb6iy2QO3aYsuVm9qXAIQ1E0Z/GuIE1LbmjrY XvHX13BzeTPmjF+tm0IB5DCYZbW5SsjbiMNBjf9605v6uwKJr6Hlum0N+ NJ8OfrhZwnACzErpK9Vd3KPvxW8uhmpVXDFgNWw8FoXbGt3ECTU7XrZt9 OJm6Dbr+qLiAZNHl5p3Nl38scI4w+jWKKK3DFDN4DYEqmtsfPQ457zQOK FasnDfgIX0BSOtnvrXP8XV397iv5ur17qJSXbOPpMYYubuNL9HZ7UFU35 g==; X-IronPort-AV: E=Sophos;i="5.93,192,1654585200"; d="scan'208";a="173519429" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 25 Jul 2022 06:07:17 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Mon, 25 Jul 2022 06:07:10 -0700 Received: from localhost.localdomain (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Mon, 25 Jul 2022 06:07:07 -0700 From: Claudiu Beznea To: , , , , , Subject: [PATCH v2 3/5] ASoC: mchp-spdiftx: remove references to mchp_i2s_caps Date: Mon, 25 Jul 2022 16:09:23 +0300 Message-ID: <20220725130925.1781791-4-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220725130925.1781791-1-claudiu.beznea@microchip.com> References: <20220725130925.1781791-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Claudiu Beznea X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Remove references to struct mchp_i2s_caps as they are not used. Signed-off-by: Claudiu Beznea --- sound/soc/atmel/mchp-spdiftx.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/sound/soc/atmel/mchp-spdiftx.c b/sound/soc/atmel/mchp-spdiftx.c index 78d5bcf0819a..20e77b374f7e 100644 --- a/sound/soc/atmel/mchp-spdiftx.c +++ b/sound/soc/atmel/mchp-spdiftx.c @@ -196,7 +196,6 @@ struct mchp_spdiftx_dev { struct clk *pclk; struct clk *gclk; unsigned int fmt; - const struct mchp_i2s_caps *caps; int gclk_enabled:1; }; @@ -768,7 +767,6 @@ MODULE_DEVICE_TABLE(of, mchp_spdiftx_dt_ids); static int mchp_spdiftx_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; - const struct of_device_id *match; struct mchp_spdiftx_dev *dev; struct resource *mem; struct regmap *regmap; @@ -782,11 +780,6 @@ static int mchp_spdiftx_probe(struct platform_device *pdev) if (!dev) return -ENOMEM; - /* Get hardware capabilities. */ - match = of_match_node(mchp_spdiftx_dt_ids, np); - if (match) - dev->caps = match->data; - /* Map I/O registers. */ base = devm_platform_get_and_ioremap_resource(pdev, 0, &mem); if (IS_ERR(base)) From patchwork Mon Jul 25 13:09:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 12928052 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 69523CCA48B for ; Mon, 25 Jul 2022 13:09:25 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 6E479886; Mon, 25 Jul 2022 15:08:33 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6E479886 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1658754563; bh=WwU9nxdctQsI4jH9K6IXqln2aORb9QSIuV6qe2LWzS8=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=mCv0i1wlg9uhnGKXMe33rFK0jhbZpCODj4kj4wu3U2bpAIoUHM1VsQhIohyS166fI HdnYyDQJ1o5wtUKJubc8NMcSrXZqm8dQE/ZCol6fpeRM4SWPMygzqnwifomco3hH/f A2RHGXgonwLvtwhzWSZnMmplE6w/nX+KWWcmEEvE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 72CB4F80553; Mon, 25 Jul 2022 15:07:30 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id DD9E0F80557; Mon, 25 Jul 2022 15:07:29 +0200 (CEST) Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 0613AF80548 for ; Mon, 25 Jul 2022 15:07:20 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0613AF80548 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="wDJLWzqj" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1658754444; x=1690290444; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=WwU9nxdctQsI4jH9K6IXqln2aORb9QSIuV6qe2LWzS8=; b=wDJLWzqj79H4s186lYUxvP0WAIiD3vEfdKId2yB+NelUMKXIijI/Fify HFAznVexbmnvOzg9z7X6fESLJkgBESWc0gYPMlUab0c7ryiLRF6RuYwBB g50TtUh4gcLQcOV3DhJ9gXel0+hcqOq9vZVyFOtTTsGJcptidDbjJO5V+ e8wbF0jChIc43cEy36YCXNsKAc1mJciWEbufAcj9kNHaDfjuqUPniucXs KYQ0P7Tx0n4HfGgXUu1O21PeqtX8F8Oke5jHiC1Uv9q28VEtaOnbuQSsV Hrfu++cmpxoMGQTW4OE/u3j4Y9hsBFXoyOVVX2S76ACMrNRtwJqS+bcbT g==; X-IronPort-AV: E=Sophos;i="5.93,192,1654585200"; d="scan'208";a="166265269" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 25 Jul 2022 06:07:13 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Mon, 25 Jul 2022 06:07:13 -0700 Received: from localhost.localdomain (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Mon, 25 Jul 2022 06:07:10 -0700 From: Claudiu Beznea To: , , , , , Subject: [PATCH v2 4/5] ASoC: mchp-spdiftx: return directly ret Date: Mon, 25 Jul 2022 16:09:24 +0300 Message-ID: <20220725130925.1781791-5-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220725130925.1781791-1-claudiu.beznea@microchip.com> References: <20220725130925.1781791-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Claudiu Beznea X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Avoid having patterns like: int ret; // ... ret = 0; // ... ret = call_function(); if (ret) return ret; return 0; and return directly ret for all cases. Signed-off-by: Claudiu Beznea --- sound/soc/atmel/mchp-spdiftx.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/sound/soc/atmel/mchp-spdiftx.c b/sound/soc/atmel/mchp-spdiftx.c index 20e77b374f7e..74729ec8423b 100644 --- a/sound/soc/atmel/mchp-spdiftx.c +++ b/sound/soc/atmel/mchp-spdiftx.c @@ -340,12 +340,10 @@ static int mchp_spdiftx_trigger(struct snd_pcm_substream *substream, int cmd, ret = regmap_write(dev->regmap, SPDIFTX_MR, mr); spin_unlock(&ctrl->lock); - if (ret) { + if (ret) dev_err(dev->dev, "unable to disable TX: %d\n", ret); - return ret; - } - return 0; + return ret; } static int mchp_spdiftx_hw_params(struct snd_pcm_substream *substream, @@ -841,12 +839,10 @@ static int mchp_spdiftx_probe(struct platform_device *pdev) err = devm_snd_soc_register_component(&pdev->dev, &mchp_spdiftx_component, &mchp_spdiftx_dai, 1); - if (err) { + if (err) dev_err(&pdev->dev, "failed to register component: %d\n", err); - return err; - } - return 0; + return err; } static struct platform_driver mchp_spdiftx_driver = { From patchwork Mon Jul 25 13:09:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 12928053 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A622CC433EF for ; Mon, 25 Jul 2022 13:09:42 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id E4740844; Mon, 25 Jul 2022 15:08:50 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E4740844 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1658754581; bh=zVQNjZCZbrx7YBoEsGRPaUn9ETcmC+pt2UNxfnvHVEk=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=JXlT5hx84kJjSdh+B8H965/O3lRtFGWSes4jcF6sIQ9HTuYfDZFqg9PGSLNUNVIcn gbTeJqTVjNDXfy83OzAkDu+TGsuUeV6clbfgofxMsXzGkxxzJtpoYoDSS1OKNqLk2h Fn7GmVlqbJBgj8QkN+8ttaNAaOTOpPc0q7N2Yn2M= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id F009FF80559; Mon, 25 Jul 2022 15:07:33 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 277A9F8055A; Mon, 25 Jul 2022 15:07:32 +0200 (CEST) Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 3DD16F80088 for ; Mon, 25 Jul 2022 15:07:25 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 3DD16F80088 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="mtmSmXft" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1658754446; x=1690290446; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=zVQNjZCZbrx7YBoEsGRPaUn9ETcmC+pt2UNxfnvHVEk=; b=mtmSmXftibXdF82iIYR+z9himamx0bSTNOQ6C43LcLbsKP5H15ziw/nG np8WL/caX4f2V/mmfrTrO5HcSSgnkkH2WJkpHVQoMmJpXi+orWeb6T8ji +g6Y5RSrduaLEveu/jrLLOxsun6ULwj38Yt4WxIoiywfVK2B9S7yjfZYT H9mRzL5lmbqlWttr7irZTvyu33vtwoQcOQA1ZVZ+jAE6INGsXFVKqNtRE my61rCOkUxG3OmyO7YgNPGUmcZUprid/cLEYtRz0l7gfCgaIMVLNTVuBY Xrvoc0ctF760ziITrl854gvkQxMz4xaJbYE3u4gW27vMonkdZ0pcHw2EX w==; X-IronPort-AV: E=Sophos;i="5.93,192,1654585200"; d="scan'208";a="166265300" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa4.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 25 Jul 2022 06:07:16 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Mon, 25 Jul 2022 06:07:15 -0700 Received: from localhost.localdomain (10.10.115.15) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Mon, 25 Jul 2022 06:07:13 -0700 From: Claudiu Beznea To: , , , , , Subject: [PATCH v2 5/5] ASoC: mchp-spdiftx: add and remove black line around MODULE_DEVICE_TABLE() Date: Mon, 25 Jul 2022 16:09:25 +0300 Message-ID: <20220725130925.1781791-6-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220725130925.1781791-1-claudiu.beznea@microchip.com> References: <20220725130925.1781791-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Claudiu Beznea X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Add blank line after MODULE_DEVICE_TABLE() and remove the one before it. Signed-off-by: Claudiu Beznea --- sound/soc/atmel/mchp-spdiftx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/atmel/mchp-spdiftx.c b/sound/soc/atmel/mchp-spdiftx.c index 74729ec8423b..e8f4ff1b7c7c 100644 --- a/sound/soc/atmel/mchp-spdiftx.c +++ b/sound/soc/atmel/mchp-spdiftx.c @@ -760,8 +760,8 @@ static const struct of_device_id mchp_spdiftx_dt_ids[] = { }, { /* sentinel */ } }; - MODULE_DEVICE_TABLE(of, mchp_spdiftx_dt_ids); + static int mchp_spdiftx_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node;