From patchwork Mon Jul 25 10:11:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 12927940 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 7AE5FC43334 for ; Mon, 25 Jul 2022 10:10:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4gSwih/dtJZPS7CIdhgdRaj9mHuydCgM4GpPqvLi1Vw=; b=v9bd4Z28oOMbYq LAJvvhfJV1GGiKZzVJSXq+s0mLWogni6F8NNZ91nQ1nJrQv/HVxSoJdphAtyMpviJvY2cm2bnuk3z WSQeFCHGH4zeMyfQYuHtmtz3Wybq1u371+m/PMYfXSGs2j0ZXGuPBgKu+D/I8amo7N4wbloVfZ+a1 wPs+bgJavRfKpOaiz+LB/zt3RcD7vGUVOhtk8W2cn8zn9r97Seb1X7HehhJUnSnaaybjUgqXsuYDL aUwLFY6W3q/Dlw3ZivytFyXe6ZpOIvU1u3avHJAE5hr4zLLoJAFtjf/LaxOPSLALxjWuvJcfwp4Yk Yk3v5MKHMOQ9hPAWdb6Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oFv1t-007yYw-A8; Mon, 25 Jul 2022 10:09:37 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oFv1T-007yIF-12 for linux-arm-kernel@lists.infradead.org; Mon, 25 Jul 2022 10:09:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1658743750; x=1690279750; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=pfFlYQJ46XkjUNiMAdcxTdm9mH/GEjmoBFYjs3nO3f0=; b=cqZHSagtBDwV69+Cow8h10I/oQUiKTGrO3dyQ18GsFTO2bHUtMc8o8um eyQ4FhhHV+k3CwZ70oAb3hiz7cZyiV3A4x9byJ7s5CkGMnXh18/DmLCnL Ly/FtutIw+xjWm30z/fN/TkC64wcnjrpgAQSgwxvh5aEGrNcR/3vTg0xZ aUcw9anCCWIyghGDMH+RkQOIUYZ0S1Jpe/2NXFyPQipDsS1Q1Z112Sbq2 FW5EHtUJF+9e9hmKf5MFY3x2Y27+KCgu1S1ARFIQXMo/PdBFx1x6qBJVs uLECBbLOTRecta3p2XvZcsrNI5plQY00EZKtdRGbVzctlZxX3JI/Eoz2M A==; X-IronPort-AV: E=Sophos;i="5.93,192,1654585200"; d="scan'208";a="173666576" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 25 Jul 2022 03:09:09 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex04.mchp-main.com (10.10.85.152) 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 03:09:09 -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 03:09:06 -0700 From: Claudiu Beznea To: , , , , , CC: , , , Claudiu Beznea Subject: [PATCH 1/5] ASoC: mchp-spdifrx: disable end of block interrupt on failures Date: Mon, 25 Jul 2022 13:11:26 +0300 Message-ID: <20220725101130.1780393-2-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220725101130.1780393-1-claudiu.beznea@microchip.com> References: <20220725101130.1780393-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220725_030911_099533_4289372B X-CRM114-Status: GOOD ( 11.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 10:11:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 12927941 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 BF1B3C433EF for ; Mon, 25 Jul 2022 10:11:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=eq56m637X/ToIyFkmFTtShO3n8Ao9rWBe491lZsUZ/k=; b=eReA8kOaM9Pg8O 2OGscJnZzacM1vbGwQlclgcFv3TvzMs7lVI4cO6ri0ScNu2f8gcqfkbv+kP5dc5yd+Vtxzn2qkE8u /RR72yAgkbJ/tu4N5hckR3EVVxJD5JFhhcyW3tnmWoC9YqHEhFh3JXoG07D5vG1+oVgIA4OkP00M4 7e5mTYn26T9SHXcKb51yCtq69EEPJ744fzmcFw93NKN4mXqiggvPUfffxpcXJQCsNLOpAgPMYNu7U SciCluwW7nmRzyBX3bt9vzVGTKuQjJnLr2L54jSKfYz81/Y7tdB4Vhjas1Kf1O4SKxSi2xg+73x8w 21PrbaTwvA+xWsY5sOIw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oFv2G-007yqJ-4G; Mon, 25 Jul 2022 10:10:00 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oFv1U-007yFp-JI for linux-arm-kernel@lists.infradead.org; Mon, 25 Jul 2022 10:09:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1658743752; x=1690279752; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7eNUHi9m1jTYNb6cRhRIgN0JdTON6pZLix7RTM4B5OU=; b=d+rVtvEnobwxX3bSfSMHPequsyp3pOGFRJiEvf585MfWHPCxK0OzNBI9 p1Rw2ppRdDxwGQahtlQ+KDEnmFpPkbraGIHRNfBIlVFLudgaQv/0rHtco aaw9FUVLZtVUtHNltK5uxiTtQL8QOyAg0+5lbGKyKRoHintrq6SkZxK1f h4zqFhtyaXRUqfYmeJmF9nmeN8A+mAdpqaOKV58/prcV+Le4HXNQUYZ02 p3F5exBIni1W6dIqNfQMOEG3g/IXAuJo7dxP2JmZT6cNjanqNEOTav/7e WZaLdIkP4FzJ+uyS21dFtUrp6WH+YZyJuyWz33hsnCmO6z0niI88Gj3HX Q==; X-IronPort-AV: E=Sophos;i="5.93,192,1654585200"; d="scan'208";a="173496314" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 25 Jul 2022 03:09:12 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex04.mchp-main.com (10.10.85.152) 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 03:09:11 -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 03:09:09 -0700 From: Claudiu Beznea To: , , , , , CC: , , , Claudiu Beznea Subject: [PATCH 2/5] ASoC: mchp-spdifrx: use single tag indent for structure Date: Mon, 25 Jul 2022 13:11:27 +0300 Message-ID: <20220725101130.1780393-3-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220725101130.1780393-1-claudiu.beznea@microchip.com> References: <20220725101130.1780393-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220725_030912_662786_68F8D8E0 X-CRM114-Status: UNSURE ( 9.56 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 10:11:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 12927942 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 94B4AC433EF for ; Mon, 25 Jul 2022 10:11:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=i9pxM7bmi1q3ds2VOpn+ckZaww+KZKLhu6w6qpvkM2Q=; b=J4pz+V6fq1hPxz 1GRElCYCyKNgA2XRQVM5QSha+CjWKmptQ42aS2nwRpB2QQawORgHKcsa0aHNuEiNvQDntflFUFmRO NK/bwQZXwW/Zz4otbrLQqq1seCd95cclcrhBmrO5mrC9pxjNjUJ1u76HxGWT6i2gjNWrY9kifL6Yn QQk+UFsdgoajDJcVjUIiGmwktBYFD6N2uDweKTSv+tUo33Qu0FKmm6mJqfTbabueM877sSgdIf77t 5e0iU3oepAtXR3o1jOcC6oL/BqLoSYxWNIjbAPtVBwit9G1KVNQFKRplZlP45ZNwDL6E0nG/azEtS ju8np7uedXm81t2WILQQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oFv2m-007zGz-86; Mon, 25 Jul 2022 10:10:33 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oFv1Y-007yMD-39 for linux-arm-kernel@lists.infradead.org; Mon, 25 Jul 2022 10:09:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1658743756; x=1690279756; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=YaWb7yZxkGG+zBnJL2IFm2f4uUx2GkI4cjt6VNqnQM4=; b=VcU3IwvO758yCUyVKwt7BADBY8C/saDQyOOkEtrzx10QmxJi9qezSYT3 S2Kv1eyl76UEDdJMKAbtpRDf+3sbNIUhAvEfd9FsmF6+28WzgfVkS/L85 xQg92UjlS8iLqrkOF+d+nwm1xQM0vp3Ku2HVsRX6gWYvKJViBaRSC/e55 +D/tkj3DcVYE6dD7SnB4t/pUpMAEUEg2XKTmJ+1zzxbgAcPTopHeAaFQ4 Lsafili5swzyDHKYMn7dXXstX9mYAD7p7RhxI9Tlnf0scw+7+Qrt7RAXD PhS//CxdpaZ2HOqdbTBSC9qBTk+vpMxoQWr5/niS+GgOnfjJStnJQB4SB w==; X-IronPort-AV: E=Sophos;i="5.93,192,1654585200"; d="scan'208";a="183602498" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 25 Jul 2022 03:09:14 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex02.mchp-main.com (10.10.85.144) 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 03:09:14 -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 03:09:12 -0700 From: Claudiu Beznea To: , , , , , CC: , , , Claudiu Beznea Subject: [PATCH 3/5] ASoC: mchp-spdiftx: remove references to mchp_i2s_caps Date: Mon, 25 Jul 2022 13:11:28 +0300 Message-ID: <20220725101130.1780393-4-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220725101130.1780393-1-claudiu.beznea@microchip.com> References: <20220725101130.1780393-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220725_030916_196779_D8D704CB X-CRM114-Status: UNSURE ( 9.33 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 10:11:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 12927943 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 863FDC43334 for ; Mon, 25 Jul 2022 10:12:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=sx1xMDHsnsPsIEwi0RxLZY1wVmbR+DqPEIwRvfl5s3c=; b=okAn4z2EsF+qs4 0PDRIczgRGdxftRFkEXLm9Ja+CYH81e+nqU9HMZh8JlYB4tkCZ7Spn3KMu5T2rg7Sxa3h4eW4na4g LmKxg186SmUM8gRwjoYIbZDjLIjPz9wJvSxU4d2mojeYaiOnW+otbKJyTNxyEOpXuGeZ755wdozgL dVcxOPJQ2qiFRS6mDnSFwg8faG9UtXsVfm6cIFPIb56v65Uv8gwqP12f88iGXbiI12D9HGbIppWAe Lk7bffTV6nSmrTpo6FVY2YM48uQ8FfvbLmv6AdnQl8uPPNbtBAHvF6x5EQTEZKMvvA0asPRaXZ387 AXDPbiXq9zMubfNvo8FQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oFv3F-007zmi-55; Mon, 25 Jul 2022 10:11:02 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oFv1a-007yNV-0J for linux-arm-kernel@lists.infradead.org; Mon, 25 Jul 2022 10:09:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1658743757; x=1690279757; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=WwU9nxdctQsI4jH9K6IXqln2aORb9QSIuV6qe2LWzS8=; b=S8mPzaKGQnx0Cp/uVH4EbwydGuzZyq2IKM9KatNDY/Qx8b/AkCH56B/F x90PVScal79ikbgplGvEKLAZVVLi8MfOBZZYntV3Q0Y5cH9xcWvlPFFvS /24MTR0HlXsIwJ9ZCDpca5P9uSyCxkSoJ67fEceYFDXSFVZTPg72VlviO 2l2nKzgzBMGPENRl6A8u9p6qK/ti+tJEgyMP7HK6MZTLc5tbbfZn2Fnwr LtN9rnX4IOQPTbKrydNnLL9r4x2ZGuybvuCDuDlJLEEKA8Ky2AGF9FUL1 Y8NCAWhxVbIjXSrLHRb/1AXDA4M9a/hHnWnRLzQAqq5w6SLGHYrsOH7+i w==; X-IronPort-AV: E=Sophos;i="5.93,192,1654585200"; d="scan'208";a="173666606" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 25 Jul 2022 03:09:17 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex02.mchp-main.com (10.10.85.144) 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 03:09:17 -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 03:09:14 -0700 From: Claudiu Beznea To: , , , , , CC: , , , Claudiu Beznea Subject: [PATCH 4/5] ASoC: mchp-spdiftx: return directly ret Date: Mon, 25 Jul 2022 13:11:29 +0300 Message-ID: <20220725101130.1780393-5-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220725101130.1780393-1-claudiu.beznea@microchip.com> References: <20220725101130.1780393-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220725_030918_086192_732C2423 X-CRM114-Status: GOOD ( 11.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 10:11:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Claudiu Beznea X-Patchwork-Id: 12927944 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 DF843C43334 for ; Mon, 25 Jul 2022 10:12:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DyICEdxZnRZ3vDMi+Lv+MMfIi1j2YZ4qNtXNAQ8f1bc=; b=ZRDfHg0h6f9nOJ eH2hnwlUEcGacVjPOTB/eIOXUsXh0VbPe9pX45pqnyPMD9F4JP+d1oKc2JRvaQSWGQTwr+oqHRjIv ah6e9Mq2YjyYDSlcBec3Ko7j0ee72pY0PgNPgwLpndN5XT6n1Ey/+zcXvw5jPNOJYYuqztg6pEdX6 OX2Rg+WztjRilkabguvWoJ2+crwWk83D0HHiA2GBQlmQjXL7k2QJESZr3/guWLD+pQa4qXBOBGrmi 2j1YJxmz0GCSI1c0+AHgPBOUkVv9diWLaJxLe4dbJ01kzFkCfllRxXg1bSQdQM0+q7ZfHdKKNo8/a rUDdlhZdaTvyD0gBMThw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oFv3p-0080M1-73; Mon, 25 Jul 2022 10:11:37 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oFv1d-007yQ9-Am for linux-arm-kernel@lists.infradead.org; Mon, 25 Jul 2022 10:09:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1658743761; x=1690279761; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=zVQNjZCZbrx7YBoEsGRPaUn9ETcmC+pt2UNxfnvHVEk=; b=y4F9VJKMSEFZn8z5GJVgHJb20dVwlxvj3kBXtY3mnxtqlH2fJzIwHEjk 2Mca3Z6ROpjbt5MFFiAqZTvYT4KSQ0v9DzDMSVFK4iZcJNLIDX32sbx0i ooDS02HSaNTkFOPpW4jnHQiXxX2pImo8CMNZIVT3l2YiAcLParH1zkEEL 0zYnXem2rzqSvRgzewdZdF+6OK7Xn3opgGLIgNyzKmLXGD7drOMiosZWy lrmyVyaLCLwI4PNqiUnHPHgFTtRgtW7l310IGCRoC0AUR1eT0c4b8h7Ki 24RljkgwrFNjjxZJt3diHneT7t7uVNor7Sgt7iyawrnLhvsKhSvjJb73+ Q==; X-IronPort-AV: E=Sophos;i="5.93,192,1654585200"; d="scan'208";a="173496326" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 25 Jul 2022 03:09:20 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex02.mchp-main.com (10.10.85.144) 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 03:09:19 -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 03:09:17 -0700 From: Claudiu Beznea To: , , , , , CC: , , , Claudiu Beznea Subject: [PATCH 5/5] ASoC: mchp-spdiftx: add and remove black line around MODULE_DEVICE_TABLE() Date: Mon, 25 Jul 2022 13:11:30 +0300 Message-ID: <20220725101130.1780393-6-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220725101130.1780393-1-claudiu.beznea@microchip.com> References: <20220725101130.1780393-1-claudiu.beznea@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220725_030921_441159_C9991A0A X-CRM114-Status: GOOD ( 11.52 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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;