From patchwork Wed Sep 2 21:21:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 11751803 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4D38113B1 for ; Wed, 2 Sep 2020 21:23:55 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id CC01E20767 for ; Wed, 2 Sep 2020 21:23:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="Avm1wZrs" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CC01E20767 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 4A9B01892; Wed, 2 Sep 2020 23:23:09 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4A9B01892 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1599081833; bh=ckK4oZ8dZJJTPZ1Z4416LfIocowK+L3r1RkecNluhEw=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Avm1wZrs4VS5RRvqRaPr1upecQ4c32nLloziEyy1ixJ8grOUq8bYssDxOcS5ySr9d pCHocorFoMGjFijeLB1q/pPaIGP1LfQZpoRkSoFw+rQKwK70T2TLZJ8S6Afl0qQw0l C/lOHLd9JNgrIaN8JwmHDpwIuN7eMU6GdM7lvcgE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 4C881F802DF; Wed, 2 Sep 2020 23:22:18 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 73D94F800F3; Wed, 2 Sep 2020 23:22:16 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_NONE, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 F1056F800F3 for ; Wed, 2 Sep 2020 23:22:09 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz F1056F800F3 IronPort-SDR: P+RHd1XZjLNr7RA/FKCqc5BGY7SwW/xl1oQV2Bgkr3bxRXT5y/l75jKE1Hl8ct8XcRY/A63Grt 0PkisvmR82RA== X-IronPort-AV: E=McAfee;i="6000,8403,9732"; a="157482847" X-IronPort-AV: E=Sophos;i="5.76,384,1592895600"; d="scan'208";a="157482847" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 14:21:58 -0700 IronPort-SDR: WT/RWF9GP4Wzgn5huYazDsZ4xLdMuz8CPnpP26L6GwgOtXtzax0nX0rXCP5Wt21QbLhWuZ0Lm5 Xm5zVeSuS20w== X-IronPort-AV: E=Sophos;i="5.76,384,1592895600"; d="scan'208";a="477798264" Received: from rnagarat-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.212.56.27]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 14:21:58 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 01/18] ALSA: core: pcm: simplify locking for timers Date: Wed, 2 Sep 2020 16:21:16 -0500 Message-Id: <20200902212133.30964-2-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200902212133.30964-1-pierre-louis.bossart@linux.intel.com> References: <20200902212133.30964-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, vkoul@kernel.org, broonie@kernel.org, Pierre-Louis Bossart 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" Fix sparse warning: sound/core/pcm.c:999:9: warning: context imbalance in 'snd_pcm_detach_substream' - different lock contexts for basic block There's no real reason to test the same thing twice, and it's simpler have linear sequences. Signed-off-by: Pierre-Louis Bossart --- sound/core/pcm.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sound/core/pcm.c b/sound/core/pcm.c index b6d2331a82f7..be5714f1bb58 100644 --- a/sound/core/pcm.c +++ b/sound/core/pcm.c @@ -991,11 +991,13 @@ void snd_pcm_detach_substream(struct snd_pcm_substream *substream) PAGE_ALIGN(sizeof(struct snd_pcm_mmap_control))); kfree(runtime->hw_constraints.rules); /* Avoid concurrent access to runtime via PCM timer interface */ - if (substream->timer) + if (substream->timer) { spin_lock_irq(&substream->timer->lock); - substream->runtime = NULL; - if (substream->timer) + substream->runtime = NULL; spin_unlock_irq(&substream->timer->lock); + } else { + substream->runtime = NULL; + } kfree(runtime); put_pid(substream->pid); substream->pid = NULL; From patchwork Wed Sep 2 21:21:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 11751807 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3E444109B for ; Wed, 2 Sep 2020 21:25:16 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id C0C6820767 for ; Wed, 2 Sep 2020 21:25:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="P8aOdoCG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C0C6820767 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 070181893; Wed, 2 Sep 2020 23:24:30 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 070181893 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1599081914; bh=BjeRGKB/Sf+aXhCr+ESND5WIYvh26RIZYG+0W7yMLgc=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=P8aOdoCGiCuhCaRV6II/57JYGjobtDLmJkKm+Gvxc3pThY+szjBjjwiZDDNVFc7O0 d6qSz43iYpGWzl7x0RseNhBdX/uU8GGCOpKo+d3PoC647rI3g0KXMcW7WGmz5kwljH cHFF4rZbpJk+ZRvvZXSk9PPjD7/wUPE+mYtSnt08= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 2C6E4F802EB; Wed, 2 Sep 2020 23:22:26 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2787CF802EA; Wed, 2 Sep 2020 23:22:22 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_NONE, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 0CCABF801DA for ; Wed, 2 Sep 2020 23:22:10 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0CCABF801DA IronPort-SDR: N1czUyei10ellIKTqH5l1fxnqiIk5Jv2XNa6vn6UDUEptdvmOVbJ/66QXXVc+Rq3D2xMeABXYA xbVD6PtKDJwQ== X-IronPort-AV: E=McAfee;i="6000,8403,9732"; a="157482850" X-IronPort-AV: E=Sophos;i="5.76,384,1592895600"; d="scan'208";a="157482850" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 14:21:59 -0700 IronPort-SDR: zF/GSz5YIFTtSOSRBGvP+Yluavb7BNSi+Y6QDIo1z1f2itA2kpKPbvAHVQ+8pIV2okKB98c/qa eWYPMcLX/wzw== X-IronPort-AV: E=Sophos;i="5.76,384,1592895600"; d="scan'208";a="477798266" Received: from rnagarat-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.212.56.27]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 14:21:58 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 02/18] ALSA: core: memalloc: fix fallthrough position Date: Wed, 2 Sep 2020 16:21:17 -0500 Message-Id: <20200902212133.30964-3-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200902212133.30964-1-pierre-louis.bossart@linux.intel.com> References: <20200902212133.30964-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, vkoul@kernel.org, broonie@kernel.org, Pierre-Louis Bossart 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" Fix cppcheck, the fallthrough only makes sense within the conditional block sound/core/memalloc.c:161:3: style:inconclusive: Statements following return, break, continue, goto or throw will never be executed. [unreachableCode] fallthrough; ^ Signed-off-by: Pierre-Louis Bossart --- sound/core/memalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/core/memalloc.c b/sound/core/memalloc.c index ad74ea9cbff5..0aeeb6244ff6 100644 --- a/sound/core/memalloc.c +++ b/sound/core/memalloc.c @@ -157,8 +157,8 @@ int snd_dma_alloc_pages(int type, struct device *device, size_t size, * so if we fail to malloc, try to fetch memory traditionally. */ dmab->dev.type = SNDRV_DMA_TYPE_DEV; -#endif /* CONFIG_GENERIC_ALLOCATOR */ fallthrough; +#endif /* CONFIG_GENERIC_ALLOCATOR */ case SNDRV_DMA_TYPE_DEV: case SNDRV_DMA_TYPE_DEV_UC: snd_malloc_dev_pages(dmab, size); From patchwork Wed Sep 2 21:21:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 11751805 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5D12113B1 for ; Wed, 2 Sep 2020 21:24:42 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id E1D2520767 for ; Wed, 2 Sep 2020 21:24:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="U9FluRoC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E1D2520767 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 36A041872; Wed, 2 Sep 2020 23:23:56 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 36A041872 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1599081880; bh=J60TIVT1goSzJshRkQz85qcx1BeHHadqDN2uZlq00YE=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=U9FluRoCpm8pfgCiIqVJHCQUGODhDlT6Mn9DrNK7D8MtnPo4Vp1+FSvYM3XAN7z11 rwGfFceh6DemZHv03qYKW/oe7U8TJmdsbRPBnd9bsrfgl98utOj5Xo3f4RqnR2FCZm Cc7+L9tZUFuOuLHCGAhU7Y/couuK0kLPRBS/eo08= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id C0DB2F802EA; Wed, 2 Sep 2020 23:22:23 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id EB4C7F802EB; Wed, 2 Sep 2020 23:22:21 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_NONE, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 E2F99F8024A for ; Wed, 2 Sep 2020 23:22:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E2F99F8024A IronPort-SDR: 7IVpiP/kAhhoT8HK3P3spd+Vln97NLrc8FFVFV9MiL5PzxYRxb8oSNEB6eQ2KXVXAPGOgkx+pJ hvRnx0mJfINw== X-IronPort-AV: E=McAfee;i="6000,8403,9732"; a="157482852" X-IronPort-AV: E=Sophos;i="5.76,384,1592895600"; d="scan'208";a="157482852" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 14:22:00 -0700 IronPort-SDR: 7WcfeQ8IIQtAH3wZz6nFe2lQJvmb0docn7pLwmnWaKqdgV64JZXMK0IWCb2RuSqvkKZevV62jO d42lINv/WdWg== X-IronPort-AV: E=Sophos;i="5.76,384,1592895600"; d="scan'208";a="477798267" Received: from rnagarat-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.212.56.27]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 14:21:59 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 03/18] ALSA: core: pcm_memory: dereference pointer after NULL checks Date: Wed, 2 Sep 2020 16:21:18 -0500 Message-Id: <20200902212133.30964-4-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200902212133.30964-1-pierre-louis.bossart@linux.intel.com> References: <20200902212133.30964-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, vkoul@kernel.org, broonie@kernel.org, Pierre-Louis Bossart 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" Fix cppcheck warnings: sound/core/pcm_memory.c:380:26: warning: Either the condition '!substream' is redundant or there is possible null pointer dereference: substream. [nullPointerRedundantCheck] struct snd_card *card = substream->pcm->card; ^ sound/core/pcm_memory.c:384:6: note: Assuming that condition '!substream' is not redundant if (PCM_RUNTIME_CHECK(substream)) ^ sound/core/pcm_memory.c:380:26: note: Null pointer dereference struct snd_card *card = substream->pcm->card; ^ sound/core/pcm_memory.c:433:26: warning: Either the condition '!substream' is redundant or there is possible null pointer dereference: substream. [nullPointerRedundantCheck] struct snd_card *card = substream->pcm->card; ^ sound/core/pcm_memory.c:436:6: note: Assuming that condition '!substream' is not redundant if (PCM_RUNTIME_CHECK(substream)) ^ sound/core/pcm_memory.c:433:26: note: Null pointer dereference struct snd_card *card = substream->pcm->card; ^ Signed-off-by: Pierre-Louis Bossart --- sound/core/pcm_memory.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/core/pcm_memory.c b/sound/core/pcm_memory.c index 1bf6a3d9e0c2..4f03ba8ed0ae 100644 --- a/sound/core/pcm_memory.c +++ b/sound/core/pcm_memory.c @@ -377,7 +377,7 @@ struct page *snd_pcm_sgbuf_ops_page(struct snd_pcm_substream *substream, unsigne */ int snd_pcm_lib_malloc_pages(struct snd_pcm_substream *substream, size_t size) { - struct snd_card *card = substream->pcm->card; + struct snd_card *card; struct snd_pcm_runtime *runtime; struct snd_dma_buffer *dmab = NULL; @@ -387,6 +387,7 @@ int snd_pcm_lib_malloc_pages(struct snd_pcm_substream *substream, size_t size) SNDRV_DMA_TYPE_UNKNOWN)) return -EINVAL; runtime = substream->runtime; + card = substream->pcm->card; if (runtime->dma_buffer_p) { /* perphaps, we might free the large DMA memory region From patchwork Wed Sep 2 21:21:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 11751809 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6AE8E109B for ; Wed, 2 Sep 2020 21:25:36 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id EDDC820767 for ; Wed, 2 Sep 2020 21:25:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="rkzXrYVV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EDDC820767 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 635DE1868; Wed, 2 Sep 2020 23:24:50 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 635DE1868 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1599081934; bh=Xr9UHzlM1BPboMgl9o4efZ9ZHPAf0cLOT8lPMOE58ik=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=rkzXrYVVf2wR/aLFPBBq0R4LijWaPATHcZlhU3uFQAz7aUv452fVfcht7jWhKuUYL IPtsYyYMmV+K/+oaHJqZtRq89xiYKGAqDlaTk34aod8I9hi0jkwf6ZUBD3Bl2fOBwQ hN+6an2ccEYutEcukY/KbTgHBOxNo4SCXzHquOTw= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 5D34DF802F7; Wed, 2 Sep 2020 23:22:27 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3C530F8024A; Wed, 2 Sep 2020 23:22:22 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_NONE, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 E2FBFF80268 for ; Wed, 2 Sep 2020 23:22:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E2FBFF80268 IronPort-SDR: sTaQEAWyuM4hNzTqEEY94woxdq+HDC3Fgv8yOapPqc6YTUdgKCosCRWCWZE7qnS4Fyd4RqYdLS Khc+gFiMKsIA== X-IronPort-AV: E=McAfee;i="6000,8403,9732"; a="157482856" X-IronPort-AV: E=Sophos;i="5.76,384,1592895600"; d="scan'208";a="157482856" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 14:22:01 -0700 IronPort-SDR: DiPg7Y93sLNQv063qqmTFfKD7nSKrs49MTJQvwXTpkqpIfg4PwTNSclw9XQuwTT451vMqG8JBa Ti/6Jw4Ec4SA== X-IronPort-AV: E=Sophos;i="5.76,384,1592895600"; d="scan'208";a="477798271" Received: from rnagarat-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.212.56.27]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 14:22:00 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 04/18] ALSA: core: timer: remove redundant assignment Date: Wed, 2 Sep 2020 16:21:19 -0500 Message-Id: <20200902212133.30964-5-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200902212133.30964-1-pierre-louis.bossart@linux.intel.com> References: <20200902212133.30964-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, vkoul@kernel.org, broonie@kernel.org, Pierre-Louis Bossart 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" Cppcheck complains about a possible NULL pointer dereference but it actually looks like the NULL assignment is not needed (same loop is used in other parts of the file without it). Signed-off-by: Pierre-Louis Bossart --- sound/core/timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/core/timer.c b/sound/core/timer.c index 6e27d87b18ed..73ad5ba76b27 100644 --- a/sound/core/timer.c +++ b/sound/core/timer.c @@ -173,7 +173,7 @@ EXPORT_SYMBOL(snd_timer_instance_free); */ static struct snd_timer *snd_timer_find(struct snd_timer_id *tid) { - struct snd_timer *timer = NULL; + struct snd_timer *timer; list_for_each_entry(timer, &snd_timer_list, device_list) { if (timer->tmr_class != tid->dev_class) From patchwork Wed Sep 2 21:21:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 11751811 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9295113B1 for ; Wed, 2 Sep 2020 21:26:18 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 2670020767 for ; Wed, 2 Sep 2020 21:26:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="MMt+F/uk" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2670020767 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 7A4BE189C; Wed, 2 Sep 2020 23:25:32 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7A4BE189C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1599081976; bh=z76BYPJKraqqcichlpMUw1vzs0G32avX6kN3zkejCGE=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=MMt+F/ukLAOBD/yIs+WWLYWgvIowulCSg8kqp9S/AzCFWki0NCf2oIoRd6wwl7+hm zumFGndOW4zJ5+4p97jyU1zqeAPuYc1p8UF5YMRRlxpwBsrGW45gM8RcT4Z0HE32eu vqyNBJU0DA+5koQyRrZ7Mi30119ELvW6jj7x99zo= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 2D00EF802FF; Wed, 2 Sep 2020 23:22:28 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6C1E0F801DA; Wed, 2 Sep 2020 23:22:22 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_NONE, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 05BA8F80257 for ; Wed, 2 Sep 2020 23:22:12 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 05BA8F80257 IronPort-SDR: hV4uUBkLGwQ627paEL6mwIiWS00Z6Lxw12hVw+FTC9UaEj4xFxhCd5TJoc9uiiiqMOuiBu0hRf tHy0eMtEiSSg== X-IronPort-AV: E=McAfee;i="6000,8403,9732"; a="157482862" X-IronPort-AV: E=Sophos;i="5.76,384,1592895600"; d="scan'208";a="157482862" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 14:22:02 -0700 IronPort-SDR: r79LqBdP6piBHW+QSzIht8Jg1WOvv/SQuauDxwl62dFmbPVX0+2YX99QYBkau4teOkJIcrp5ic h0Yz2vU44IYQ== X-IronPort-AV: E=Sophos;i="5.76,384,1592895600"; d="scan'208";a="477798273" Received: from rnagarat-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.212.56.27]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 14:22:01 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 05/18] ALSA: core: timer: clarify operator precedence Date: Wed, 2 Sep 2020 16:21:20 -0500 Message-Id: <20200902212133.30964-6-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200902212133.30964-1-pierre-louis.bossart@linux.intel.com> References: <20200902212133.30964-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, vkoul@kernel.org, broonie@kernel.org, Pierre-Louis Bossart 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" fix cppcheck warning: sound/core/timer.c:1286:9: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] ? "running" : "stopped"); ^ Signed-off-by: Pierre-Louis Bossart --- sound/core/timer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/core/timer.c b/sound/core/timer.c index 73ad5ba76b27..227d8152d325 100644 --- a/sound/core/timer.c +++ b/sound/core/timer.c @@ -1280,8 +1280,8 @@ static void snd_timer_proc_read(struct snd_info_entry *entry, list_for_each_entry(ti, &timer->open_list_head, open_list) snd_iprintf(buffer, " Client %s : %s\n", ti->owner ? ti->owner : "unknown", - ti->flags & (SNDRV_TIMER_IFLG_START | - SNDRV_TIMER_IFLG_RUNNING) + (ti->flags & (SNDRV_TIMER_IFLG_START | + SNDRV_TIMER_IFLG_RUNNING)) ? "running" : "stopped"); } mutex_unlock(®ister_mutex); From patchwork Wed Sep 2 21:21:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 11751813 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0F93013B1 for ; Wed, 2 Sep 2020 21:26:35 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 9922320767 for ; Wed, 2 Sep 2020 21:26:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="Ox8ivSy/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9922320767 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 109E31891; Wed, 2 Sep 2020 23:25:49 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 109E31891 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1599081993; bh=i6nb6+VvlANo3l7uN/RfGvY54QieHhFbA/V669vhMYo=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Ox8ivSy/bMvbt4Btp5X56/wTIowGqrFGrs6nBjVgpaipmeznfuIfFCafdM6/42twU 1YBTlxTf+WPfSXjXNv/DzQJ4XMOoT1kfams1s62TF4YhWgtl/tQV61LmJrx+5WjB39 vIpl/jXABTcZc4RYqMFrmronXmjVRGquFPKaTpOo= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id E15CBF80304; Wed, 2 Sep 2020 23:22:29 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id BDA3BF802E9; Wed, 2 Sep 2020 23:22:23 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_NONE, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 ECE9CF802A1 for ; Wed, 2 Sep 2020 23:22:13 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz ECE9CF802A1 IronPort-SDR: FkKqZubbhwxw3PhfOhAs4T+rIf1gl8iT8I0bfQy0pGiuxQ2P+p0Yugz93DZzpGY1emlpCOrYmo XuB3q16sgHAA== X-IronPort-AV: E=McAfee;i="6000,8403,9732"; a="157482864" X-IronPort-AV: E=Sophos;i="5.76,384,1592895600"; d="scan'208";a="157482864" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 14:22:03 -0700 IronPort-SDR: P3epRokmuU92bMwRNgzI0qF+cjykb5zb1C14b33fa7KNmUfkr5HBauHiSEV/WBSuRex5ipF8Dg 0krUeJ+2TAxw== X-IronPort-AV: E=Sophos;i="5.76,384,1592895600"; d="scan'208";a="477798275" Received: from rnagarat-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.212.56.27]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 14:22:02 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 06/18] ALSA: compress_offload: dereference after checking for NULL pointer Date: Wed, 2 Sep 2020 16:21:21 -0500 Message-Id: <20200902212133.30964-7-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200902212133.30964-1-pierre-louis.bossart@linux.intel.com> References: <20200902212133.30964-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, vkoul@kernel.org, broonie@kernel.org, Pierre-Louis Bossart 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" Fix cppcheck warning and only dereference once the initial checks are done: sound/core/compress_offload.c:516:38: warning: Either the condition '!stream' is redundant or there is possible null pointer dereference: stream. [nullPointerRedundantCheck] struct snd_compr_runtime *runtime = stream->runtime; ^ sound/core/compress_offload.c:518:17: note: Assuming that condition '!stream' is not redundant if (snd_BUG_ON(!(stream) || !(stream)->runtime)) ^ sound/core/compress_offload.c:516:38: note: Null pointer dereference struct snd_compr_runtime *runtime = stream->runtime; ^ Signed-off-by: Pierre-Louis Bossart Acked-By: Vinod Koul --- sound/core/compress_offload.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c index 0e53f6f31916..e3eb314acb10 100644 --- a/sound/core/compress_offload.c +++ b/sound/core/compress_offload.c @@ -513,10 +513,11 @@ EXPORT_SYMBOL(snd_compr_malloc_pages); int snd_compr_free_pages(struct snd_compr_stream *stream) { - struct snd_compr_runtime *runtime = stream->runtime; + struct snd_compr_runtime *runtime; if (snd_BUG_ON(!(stream) || !(stream)->runtime)) return -EINVAL; + runtime = stream->runtime; if (runtime->dma_area == NULL) return 0; if (runtime->dma_buffer_p != &stream->dma_buffer) { From patchwork Wed Sep 2 21:21:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 11751815 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C34DF109B for ; Wed, 2 Sep 2020 21:27:21 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 5039B20767 for ; Wed, 2 Sep 2020 21:27:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="rY6Cg8R+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5039B20767 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 D82C318A9; Wed, 2 Sep 2020 23:26:35 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D82C318A9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1599082039; bh=DJnp++F4/FUL3looa3sB9EiGiG4RTck0lgsFbHayKPA=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=rY6Cg8R+mktGDyJ6aHMJmEp+UGjDJwLX6Lap6pHJJ1a8T/tkwKcp21tEMoC7E9g3F glssOVn1684uQ1YQY6h97/TL9TvY41Bc1cJ8qmZ2sJWsm09Vxfc4LARwMDsbvOR3VY 48VPVnXXmntccB5ghZKJ4kCyIKXEASJskSZiaXbg= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 88F91F802E1; Wed, 2 Sep 2020 23:22:45 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id B37A4F80305; Wed, 2 Sep 2020 23:22:28 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_NONE, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 ECB04F8026F for ; Wed, 2 Sep 2020 23:22:13 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz ECB04F8026F IronPort-SDR: qU2YCTJqJRIRQqUjWdnIDCPIcyUOPGTwTg+EZ2L72ecvklx9R9TFI9dLQxdNiVWE40AL+EBOzz rW2q729mPlag== X-IronPort-AV: E=McAfee;i="6000,8403,9732"; a="157482867" X-IronPort-AV: E=Sophos;i="5.76,384,1592895600"; d="scan'208";a="157482867" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 14:22:04 -0700 IronPort-SDR: QOKeDLrkaii+YP1XS9ojvCow0A2eZLTywf8PhBlGEEefJdm39PuhTTB0QUNcaxWl9lI+8OH80G 6As0YfvmaD3w== X-IronPort-AV: E=Sophos;i="5.76,384,1592895600"; d="scan'208";a="477798278" Received: from rnagarat-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.212.56.27]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 14:22:03 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 07/18] ALSA: compress_offload: remove redundant initialization Date: Wed, 2 Sep 2020 16:21:22 -0500 Message-Id: <20200902212133.30964-8-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200902212133.30964-1-pierre-louis.bossart@linux.intel.com> References: <20200902212133.30964-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, vkoul@kernel.org, broonie@kernel.org, Pierre-Louis Bossart 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" Fix cppcheck warning: sound/core/compress_offload.c:1044:6: style: Redundant initialization for 'ret'. The initialized value is overwritten before it is read. [redundantInitialization] ret = snd_register_device(SNDRV_DEVICE_TYPE_COMPRESS, ^ sound/core/compress_offload.c:1034:10: note: ret is initialized int ret = -EINVAL; ^ sound/core/compress_offload.c:1044:6: note: ret is overwritten ret = snd_register_device(SNDRV_DEVICE_TYPE_COMPRESS, ^ Signed-off-by: Pierre-Louis Bossart Acked-By: Vinod Koul --- sound/core/compress_offload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/core/compress_offload.c b/sound/core/compress_offload.c index e3eb314acb10..c1fec932c49d 100644 --- a/sound/core/compress_offload.c +++ b/sound/core/compress_offload.c @@ -1032,7 +1032,7 @@ static const struct file_operations snd_compr_file_ops = { static int snd_compress_dev_register(struct snd_device *device) { - int ret = -EINVAL; + int ret; struct snd_compr *compr; if (snd_BUG_ON(!device || !device->device_data)) From patchwork Wed Sep 2 21:21:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 11751817 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BC19313B1 for ; Wed, 2 Sep 2020 21:27:59 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 48DF320767 for ; Wed, 2 Sep 2020 21:27:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="Cb+jkR2y" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 48DF320767 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 CC42318A0; Wed, 2 Sep 2020 23:27:13 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz CC42318A0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1599082077; bh=zUTsCy7/7fcCVCyQCW9W2ess/aluYwFYoA/9h0Wtgpk=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Cb+jkR2yQ7u2MvOm/2WGPpfrvt1zVQj+F7eguoV9ZbT9TmWUrkqxDPfrxoGYSP4CM zASRjba2zTOqmbI8Nvw5PzdpV1o7oK6kMWIj63UWiPWQeUf0BPxmsqZ/GZpZHriOK0 Y5x+dGKrc+08qAuftOMLHe9RNuspZ6Z3/qTcZmPQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 8772DF80308; Wed, 2 Sep 2020 23:22:46 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 59F5CF80305; Wed, 2 Sep 2020 23:22:29 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_NONE, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 DAA01F802BC for ; Wed, 2 Sep 2020 23:22:14 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz DAA01F802BC IronPort-SDR: 88kus5pVCmw1p7XNxgAZf0AhgPDuRA+hhmx0kkDxugwqzrnehU0ac8Cmcm5VE3SasFca9UfLsq gAU9DAItr74Q== X-IronPort-AV: E=McAfee;i="6000,8403,9732"; a="157482868" X-IronPort-AV: E=Sophos;i="5.76,384,1592895600"; d="scan'208";a="157482868" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 14:22:05 -0700 IronPort-SDR: 14Ixlj80XKVk5gnk7Lucy8ezRNuX8l/tZxoyyXl1ALv2acfios202mM+3QxgH5nfXKUpngMBc7 oRgHyc4UtEWg== X-IronPort-AV: E=Sophos;i="5.76,384,1592895600"; d="scan'208";a="477798280" Received: from rnagarat-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.212.56.27]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 14:22:04 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 08/18] ALSA: core: init: use DECLARE_COMPLETION_ONSTACK() macro Date: Wed, 2 Sep 2020 16:21:23 -0500 Message-Id: <20200902212133.30964-9-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200902212133.30964-1-pierre-louis.bossart@linux.intel.com> References: <20200902212133.30964-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, vkoul@kernel.org, broonie@kernel.org, Pierre-Louis Bossart 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" Follow recommendation in Documentation/scheduler/completion.rst and use macro to declare local 'struct completion' Signed-off-by: Pierre-Louis Bossart --- sound/core/init.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/core/init.c b/sound/core/init.c index 0478847ba2b8..764dbe673d48 100644 --- a/sound/core/init.c +++ b/sound/core/init.c @@ -519,10 +519,9 @@ EXPORT_SYMBOL(snd_card_free_when_closed); */ int snd_card_free(struct snd_card *card) { - struct completion released; + DECLARE_COMPLETION_ONSTACK(released); int ret; - init_completion(&released); card->release_completion = &released; ret = snd_card_free_when_closed(card); if (ret) From patchwork Wed Sep 2 21:21:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 11751821 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 10E88109B for ; Wed, 2 Sep 2020 21:29:00 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 92428208C7 for ; Wed, 2 Sep 2020 21:28:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="fXe5iw2c" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 92428208C7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 2954B189C; Wed, 2 Sep 2020 23:28:14 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2954B189C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1599082138; bh=qN8ir4Vi4bmuW5UvlyqwGEoUoB4xbhn16gj2GNi6rZ8=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=fXe5iw2cGub6NnKtXb4/H9DjlWOZifNx4ivn4pDOpN9Ajzt6DcTxIKWfqrlZwRZrX 8kG//06XBIU2GFrtyPMaq/OuWc4Ihk7h0wZRutKvlOC+kZLda1auT11VaLTqmdK6bz bZHiOJnQJfc+lA48F500hzHu2kvprHxpfRmMe3NI= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 1A333F80322; Wed, 2 Sep 2020 23:22:48 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7F7DBF80307; Wed, 2 Sep 2020 23:22:30 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_NONE, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 043CCF802DB for ; Wed, 2 Sep 2020 23:22:15 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 043CCF802DB IronPort-SDR: WDYnrVjoZ7A9/3W8f9lG4Ptk8XFn8w/CduBhrGif3+DgW4wDuI6Iufb2+L8Vf3Y3g0e+ch5yQx nfWWZ4wEp72w== X-IronPort-AV: E=McAfee;i="6000,8403,9732"; a="157482870" X-IronPort-AV: E=Sophos;i="5.76,384,1592895600"; d="scan'208";a="157482870" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 14:22:05 -0700 IronPort-SDR: HDtl1awHtZIfqlFvrUfef2fMgFKyMrXeXtS2Xv0hPQKtFP2V8ihb2bp25K3+dOzd/lTVQL8Xda iAdu000wHSmw== X-IronPort-AV: E=Sophos;i="5.76,384,1592895600"; d="scan'208";a="477798282" Received: from rnagarat-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.212.56.27]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 14:22:05 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 09/18] ALSA: aoa: i2sbus: use DECLARE_COMPLETION_ONSTACK() macro Date: Wed, 2 Sep 2020 16:21:24 -0500 Message-Id: <20200902212133.30964-10-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200902212133.30964-1-pierre-louis.bossart@linux.intel.com> References: <20200902212133.30964-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, vkoul@kernel.org, broonie@kernel.org, Pierre-Louis Bossart 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" Follow recommendation in Documentation/scheduler/completion.rst and use macro to declare local 'struct completion' Signed-off-by: Pierre-Louis Bossart --- sound/aoa/soundbus/i2sbus/pcm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/aoa/soundbus/i2sbus/pcm.c b/sound/aoa/soundbus/i2sbus/pcm.c index d350dbd24305..1c8e8131a716 100644 --- a/sound/aoa/soundbus/i2sbus/pcm.c +++ b/sound/aoa/soundbus/i2sbus/pcm.c @@ -254,12 +254,11 @@ static void i2sbus_wait_for_stop(struct i2sbus_dev *i2sdev, struct pcm_info *pi) { unsigned long flags; - struct completion done; + DECLARE_COMPLETION_ONSTACK(done); long timeout; spin_lock_irqsave(&i2sdev->low_lock, flags); if (pi->dbdma_ring.stopping) { - init_completion(&done); pi->stop_completion = &done; spin_unlock_irqrestore(&i2sdev->low_lock, flags); timeout = wait_for_completion_timeout(&done, HZ); From patchwork Wed Sep 2 21:21:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 11751819 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 56CCC13B1 for ; Wed, 2 Sep 2020 21:28:34 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id D570C20767 for ; Wed, 2 Sep 2020 21:28:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="kU0SSH5+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D570C20767 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 5353A170F; Wed, 2 Sep 2020 23:27:48 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5353A170F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1599082112; bh=gCmZiEwaW/sHkqAN1bMyYqiWCofXWCuhTqccy30wQqg=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=kU0SSH5+mkIxUoJkj0/gfDDuktsNkmfv1peHQlRwaoTkbyBLOIs0DSr6PKP74KA7J jk8BXIao3G62LYcMhL3HCVHZW/ggKHsg0qvL0GP3blUzxwtz0RzfkZ6md2C3YvBJZq LdYGs/foxbL4kpORT8usftZMamFWof+mWeKff3X0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 49E4AF8031A; Wed, 2 Sep 2020 23:22:47 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 02135F80306; Wed, 2 Sep 2020 23:22:29 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: ** X-Spam-Status: No, score=2.3 required=5.0 tests=SPF_HELO_NONE,SPF_NONE, TVD_SUBJ_WIPE_DEBT,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 E69DFF802C3 for ; Wed, 2 Sep 2020 23:22:15 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E69DFF802C3 IronPort-SDR: FVW7YaOgoQFGvW206WyuOGxic7nmSy+aFPiSzV0gpxENdyzUOouPL+fRnqTJrRR6SpjEYVipHu mddNuManhJSQ== X-IronPort-AV: E=McAfee;i="6000,8403,9732"; a="157482873" X-IronPort-AV: E=Sophos;i="5.76,384,1592895600"; d="scan'208";a="157482873" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 14:22:06 -0700 IronPort-SDR: zdjWUYucAIHyUH9Rd7PSoOMLLfF3MoV6723DCtSS2aCLTMno9QuczngkRu/TcJ237mEFMSN6PY VO/bxhrWsCMA== X-IronPort-AV: E=Sophos;i="5.76,384,1592895600"; d="scan'208";a="477798283" Received: from rnagarat-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.212.56.27]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 14:22:05 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 10/18] ALSA: hda: auto_parser: remove shadowed variable declaration Date: Wed, 2 Sep 2020 16:21:25 -0500 Message-Id: <20200902212133.30964-11-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200902212133.30964-1-pierre-louis.bossart@linux.intel.com> References: <20200902212133.30964-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, vkoul@kernel.org, broonie@kernel.org, Pierre-Louis Bossart 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" Fix cppcheck warning: sound/pci/hda/hda_auto_parser.c:353:7: style: Local variable 'i' shadows outer variable [shadowVariable] int i = 0; ^ sound/pci/hda/hda_auto_parser.c:182:6: note: Shadowed declaration int i; ^ sound/pci/hda/hda_auto_parser.c:353:7: note: Shadow variable int i = 0; ^ It's not clear why a new declaration was added, remove and reuse variable declared with larger scope. Signed-off-by: Pierre-Louis Bossart --- sound/pci/hda/hda_auto_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/pci/hda/hda_auto_parser.c b/sound/pci/hda/hda_auto_parser.c index 824f4ac1a8ce..4dc01647753c 100644 --- a/sound/pci/hda/hda_auto_parser.c +++ b/sound/pci/hda/hda_auto_parser.c @@ -350,7 +350,7 @@ int snd_hda_parse_pin_defcfg(struct hda_codec *codec, */ if (!cfg->line_outs && cfg->hp_outs > 1 && !(cond_flags & HDA_PINCFG_NO_HP_FIXUP)) { - int i = 0; + i = 0; while (i < cfg->hp_outs) { /* The real HPs should have the sequence 0x0f */ if ((hp_out[i].seq & 0x0f) == 0x0f) { From patchwork Wed Sep 2 21:21:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 11751825 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F139C14E3 for ; Wed, 2 Sep 2020 21:30:08 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 864CC20767 for ; Wed, 2 Sep 2020 21:30:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="G2nPCFet" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 864CC20767 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 15348189B; Wed, 2 Sep 2020 23:29:23 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 15348189B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1599082207; bh=3z36l9vVtDg6LRaVSiuueU8BXzhuPF2T8gBz0Y7fgCs=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=G2nPCFetrs+MzyzjWLhzd+M7jc4PVs1XhXh5j5rKfGcjIYgIo62ZcRSCUebnUqa2w FNhNKEzqXyEcSvDA7ucqvU+8NaueEeZ9ELjocC6nTRrb7+OkZ8kFRA/uPfgv0/XZUk zVfU2tPSCZ6GKqVDJNh5fTkNsnBHOeCbVNX40WgU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 2F281F80336; Wed, 2 Sep 2020 23:22:52 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 18407F8026F; Wed, 2 Sep 2020 23:22:30 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_NONE, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 CC87BF802DC for ; Wed, 2 Sep 2020 23:22:16 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CC87BF802DC IronPort-SDR: 6nRPuyIIH2ZEDTC+mmqPw5C5UjRm0hyn41pdqDuEE/IOGIxxDRgsyX8/MKhC7YMxQSeNM4Vsik o5UP+Vaj29rw== X-IronPort-AV: E=McAfee;i="6000,8403,9732"; a="157482876" X-IronPort-AV: E=Sophos;i="5.76,384,1592895600"; d="scan'208";a="157482876" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 14:22:07 -0700 IronPort-SDR: BDhV0Uc0I0qCGCEGQtZE454H2S92MgDX3rS2QSs8AYQpsF0SGk8nPFIkAfnt0UdrSPSbbGlUDN VMkYePEljtZA== X-IronPort-AV: E=Sophos;i="5.76,384,1592895600"; d="scan'208";a="477798287" Received: from rnagarat-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.212.56.27]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 14:22:06 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 11/18] ALSA: hda: (cosmetic) align function parameters Date: Wed, 2 Sep 2020 16:21:26 -0500 Message-Id: <20200902212133.30964-12-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200902212133.30964-1-pierre-louis.bossart@linux.intel.com> References: <20200902212133.30964-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, vkoul@kernel.org, broonie@kernel.org, Pierre-Louis Bossart 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" Fix cppcheck warnings and use same names in headers and C code. Signed-off-by: Pierre-Louis Bossart --- sound/pci/hda/hda_jack.h | 2 +- sound/pci/hda/hda_local.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sound/pci/hda/hda_jack.h b/sound/pci/hda/hda_jack.h index 727b6d3ba454..8ceaf0ef5df1 100644 --- a/sound/pci/hda/hda_jack.h +++ b/sound/pci/hda/hda_jack.h @@ -77,7 +77,7 @@ int snd_hda_jack_detect_enable(struct hda_codec *codec, hda_nid_t nid, struct hda_jack_callback * snd_hda_jack_detect_enable_callback_mst(struct hda_codec *codec, hda_nid_t nid, - int dev_id, hda_jack_callback_fn cb); + int dev_id, hda_jack_callback_fn func); /** * snd_hda_jack_detect_enable - enable the jack-detection diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h index 8c28b1022f49..5beb8aa44ecd 100644 --- a/sound/pci/hda/hda_local.h +++ b/sound/pci/hda/hda_local.h @@ -100,7 +100,7 @@ int snd_hda_mixer_amp_volume_get(struct snd_kcontrol *kcontrol, int snd_hda_mixer_amp_volume_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol); int snd_hda_mixer_amp_tlv(struct snd_kcontrol *kcontrol, int op_flag, - unsigned int size, unsigned int __user *tlv); + unsigned int size, unsigned int __user *_tlv); int snd_hda_mixer_amp_switch_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo); int snd_hda_mixer_amp_switch_get(struct snd_kcontrol *kcontrol, @@ -119,7 +119,7 @@ int snd_hda_mixer_amp_switch_put_beep(struct snd_kcontrol *kcontrol, int snd_hda_codec_amp_update(struct hda_codec *codec, hda_nid_t nid, int ch, int dir, int idx, int mask, int val); int snd_hda_codec_amp_stereo(struct hda_codec *codec, hda_nid_t nid, - int dir, int idx, int mask, int val); + int direction, int idx, int mask, int val); int snd_hda_codec_amp_init(struct hda_codec *codec, hda_nid_t nid, int ch, int direction, int idx, int mask, int val); int snd_hda_codec_amp_init_stereo(struct hda_codec *codec, hda_nid_t nid, @@ -198,7 +198,7 @@ int snd_hda_input_mux_put(struct hda_codec *codec, unsigned int *cur_val); int snd_hda_add_imux_item(struct hda_codec *codec, struct hda_input_mux *imux, const char *label, - int index, int *type_index_ret); + int index, int *type_idx); /* * Multi-channel / digital-out PCM helper @@ -642,7 +642,7 @@ unsigned int snd_hda_codec_eapd_power_filter(struct hda_codec *codec, */ int snd_hda_enum_helper_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo, - int num_entries, const char * const *texts); + int num_items, const char * const *texts); #define snd_hda_enum_bool_helper_info(kcontrol, uinfo) \ snd_hda_enum_helper_info(kcontrol, uinfo, 0, NULL) From patchwork Wed Sep 2 21:21:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 11751823 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9DCDE109B for ; Wed, 2 Sep 2020 21:29:37 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 27D0720767 for ; Wed, 2 Sep 2020 21:29:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="T1toTGc3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 27D0720767 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 9225F1891; Wed, 2 Sep 2020 23:28:51 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9225F1891 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1599082175; bh=/arOLmjw8S8FKAI86vW/9nLoYu3rU6pnH3rmjI1JnJM=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=T1toTGc3h5X9tgrBm/AvRfBDGOfh+pVJfvsagoUrWOqlKFbUGa6CLyH+HSUzp9p+0 SgsA0eciC8PjmOD7DaZLCsTN2QdylWjk8rhSuirgMs+aUdBcC5PK4vl83DGyUJJHr2 P1F+BsBr9DGi7ZvZGlyr/grAfT3gQjnOi9lLvDJI= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 0B398F80331; Wed, 2 Sep 2020 23:22:51 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id C9CE2F802DB; Wed, 2 Sep 2020 23:22:30 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_NONE, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 E9F8CF802E0 for ; Wed, 2 Sep 2020 23:22:17 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E9F8CF802E0 IronPort-SDR: SwU/UxTq6UmPc2UAYwUBrVY5qVTG6QHkD7uNjqZrUyrDT7H+pQjxJFcFRlwqom8gXGDtVuDtDz 6kqcuyZl5VYw== X-IronPort-AV: E=McAfee;i="6000,8403,9732"; a="157482880" X-IronPort-AV: E=Sophos;i="5.76,384,1592895600"; d="scan'208";a="157482880" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 14:22:08 -0700 IronPort-SDR: oJ8LHOjZMmIawaws+KiOev1FNLML6RgIwQFGWGPqkMLrPiVWuqNMuwgsz1xAE0KlAr+FlumMHv LKMx1KMMyQpw== X-IronPort-AV: E=Sophos;i="5.76,384,1592895600"; d="scan'208";a="477798290" Received: from rnagarat-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.212.56.27]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 14:22:07 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 12/18] ALSA: usb: scarless_gen2: fix endianness issue Date: Wed, 2 Sep 2020 16:21:27 -0500 Message-Id: <20200902212133.30964-13-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200902212133.30964-1-pierre-louis.bossart@linux.intel.com> References: <20200902212133.30964-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, vkoul@kernel.org, broonie@kernel.org, Pierre-Louis Bossart 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" Fix Sparse warning: sound/usb/mixer_scarlett_gen2.c:1949:24: warning: cast to restricted __le32 Signed-off-by: Pierre-Louis Bossart --- sound/usb/mixer_scarlett_gen2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/usb/mixer_scarlett_gen2.c b/sound/usb/mixer_scarlett_gen2.c index 0ffff7640892..d33df146d6ce 100644 --- a/sound/usb/mixer_scarlett_gen2.c +++ b/sound/usb/mixer_scarlett_gen2.c @@ -1946,7 +1946,7 @@ static void scarlett2_mixer_interrupt(struct urb *urb) goto requeue; if (len == 8) { - data = le32_to_cpu(*(u32 *)urb->transfer_buffer); + data = le32_to_cpu(*(__le32 *)urb->transfer_buffer); if (data & SCARLETT2_USB_INTERRUPT_VOL_CHANGE) scarlett2_mixer_interrupt_vol_change(mixer); if (data & SCARLETT2_USB_INTERRUPT_BUTTON_CHANGE) From patchwork Wed Sep 2 21:21:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 11751829 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D0D5014E3 for ; Wed, 2 Sep 2020 21:31:14 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 5E6D1207EA for ; Wed, 2 Sep 2020 21:31:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="gwCQnYPm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5E6D1207EA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 C7D1F18A2; Wed, 2 Sep 2020 23:30:28 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C7D1F18A2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1599082272; bh=LobmKfKuqi3VzFfC78FZt/ivNW0WfYsw62vxZCRCYMU=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=gwCQnYPmVzTT/2gyiKphRsbCpkHC+vo/epNwwU/BseQH7gV9oA6vhleoCj7MEDKT2 u39oS1ymwmLrn3yBvpLpg7X4RJ218fILu7sdcnMYyZar6rykHpak7v4J1h0DBDfBoD Thwcm5B4WwaYWvgsj1lB3pElT+ViCWIoe/N3/YSY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 3AB10F80341; Wed, 2 Sep 2020 23:22:55 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id B17E1F80306; Wed, 2 Sep 2020 23:22:34 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_NONE, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 18D43F802E1 for ; Wed, 2 Sep 2020 23:22:17 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 18D43F802E1 IronPort-SDR: 18OkODOZF3zn0pXH1SNn5EfrA83fRbL6TxCNOm6fEURv1KFr5DGcncE1ipQUpoew6iJ3P0wxu2 6lD6ltN81LeQ== X-IronPort-AV: E=McAfee;i="6000,8403,9732"; a="157482883" X-IronPort-AV: E=Sophos;i="5.76,384,1592895600"; d="scan'208";a="157482883" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 14:22:09 -0700 IronPort-SDR: 7fampBUinODS36hWHd8zfMNuizV7+1yyhIk2aFESyMZ10c6sAN491AxGODFYU66J4Gy2gzv9HO ZJJoCVW+2EvQ== X-IronPort-AV: E=Sophos;i="5.76,384,1592895600"; d="scan'208";a="477798292" Received: from rnagarat-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.212.56.27]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 14:22:08 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 13/18] ALSA: ac97: (cosmetic) align argument names Date: Wed, 2 Sep 2020 16:21:28 -0500 Message-Id: <20200902212133.30964-14-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200902212133.30964-1-pierre-louis.bossart@linux.intel.com> References: <20200902212133.30964-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, vkoul@kernel.org, broonie@kernel.org, Pierre-Louis Bossart 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" Fix cppcheck warning: sound/ac97/bus.c:133:60: style:inconclusive: Function 'snd_ac97_bus_scan_one' argument 1 names different: declaration 'ac97' definition 'adrv'. [funcArgNamesDifferent] Signed-off-by: Pierre-Louis Bossart --- sound/ac97/ac97_core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/ac97/ac97_core.h b/sound/ac97/ac97_core.h index 0c5956e4b2f3..5a9677c3d4c3 100644 --- a/sound/ac97/ac97_core.h +++ b/sound/ac97/ac97_core.h @@ -3,7 +3,7 @@ * Copyright (C) 2016 Robert Jarzmik */ -unsigned int snd_ac97_bus_scan_one(struct ac97_controller *ac97, +unsigned int snd_ac97_bus_scan_one(struct ac97_controller *adrv, unsigned int codec_num); static inline bool ac97_ids_match(unsigned int id1, unsigned int id2, From patchwork Wed Sep 2 21:21:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 11751827 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 798FF14E3 for ; Wed, 2 Sep 2020 21:30:35 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 0BDB2207EA for ; Wed, 2 Sep 2020 21:30:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="FnxX3rqq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0BDB2207EA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 7957718AF; Wed, 2 Sep 2020 23:29:49 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7957718AF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1599082233; bh=STL72+vaR3DvuXyR7x0NTMIOEw+sS1SURLZdAkvUyNw=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=FnxX3rqqitgh7ToBCn9MQXj8tsW87i8dv0uj7BqouukRLrf7XABmSC+tVUdRtOWqU wpZDEyzsDg3fo1TYaaW5VA+A576wxzHpUZEwzzSSh9T3XUcSTN+AqGjSUNSgzb+KQQ +8ovUiJmRmcbybaryRDV0sfMilElE8SX18F48sag= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 6C2F4F80338; Wed, 2 Sep 2020 23:22:53 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6C8B2F80307; Wed, 2 Sep 2020 23:22:33 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_NONE, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 C56D9F802E3 for ; Wed, 2 Sep 2020 23:22:18 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C56D9F802E3 IronPort-SDR: JniAJygQzO+YBu/tC4dIU/XQqg5qBdhWhbWAswMK1Q/tmL8ErBOWKCYzIj0h87fWSWWldeU8rG shk4JZOUp94w== X-IronPort-AV: E=McAfee;i="6000,8403,9732"; a="157482887" X-IronPort-AV: E=Sophos;i="5.76,384,1592895600"; d="scan'208";a="157482887" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 14:22:10 -0700 IronPort-SDR: a6eWwE0Uwx7y8/ODhLdlYDAbjq4Y23VZO9y/PlsO+R2XPnfHOljGq6LdxDNnXyqByj1GVrPwle fGbOMLFaO0ug== X-IronPort-AV: E=Sophos;i="5.76,384,1592895600"; d="scan'208";a="477798293" Received: from rnagarat-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.212.56.27]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 14:22:09 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 14/18] ALSA: atmel: ac97: clarify operator precedence Date: Wed, 2 Sep 2020 16:21:29 -0500 Message-Id: <20200902212133.30964-15-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200902212133.30964-1-pierre-louis.bossart@linux.intel.com> References: <20200902212133.30964-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, vkoul@kernel.org, broonie@kernel.org, Pierre-Louis Bossart 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" Fix cppcheck warnings: sound/atmel/ac97c.c:478:30: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] casr & AC97C_CSR_OVRUN ? " OVRUN" : "", ^ sound/atmel/ac97c.c:479:30: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] casr & AC97C_CSR_RXRDY ? " RXRDY" : "", ^ sound/atmel/ac97c.c:480:30: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] casr & AC97C_CSR_UNRUN ? " UNRUN" : "", ^ sound/atmel/ac97c.c:481:30: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] casr & AC97C_CSR_TXEMPTY ? " TXEMPTY" : "", ^ sound/atmel/ac97c.c:482:30: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] casr & AC97C_CSR_TXRDY ? " TXRDY" : "", ^ sound/atmel/ac97c.c:524:30: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] cosr & AC97C_CSR_OVRUN ? " OVRUN" : "", ^ sound/atmel/ac97c.c:525:30: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] cosr & AC97C_CSR_RXRDY ? " RXRDY" : "", ^ sound/atmel/ac97c.c:526:30: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] cosr & AC97C_CSR_TXEMPTY ? " TXEMPTY" : "", ^ sound/atmel/ac97c.c:527:30: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] cosr & AC97C_CSR_TXRDY ? " TXRDY" : "", ^ Signed-off-by: Pierre-Louis Bossart --- sound/atmel/ac97c.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/sound/atmel/ac97c.c b/sound/atmel/ac97c.c index 1006458f7f85..66ecbd4d034e 100644 --- a/sound/atmel/ac97c.c +++ b/sound/atmel/ac97c.c @@ -475,12 +475,12 @@ static irqreturn_t atmel_ac97c_interrupt(int irq, void *dev) struct snd_pcm_runtime *runtime; int offset, next_period, block_size; dev_dbg(&chip->pdev->dev, "channel A event%s%s%s%s%s%s\n", - casr & AC97C_CSR_OVRUN ? " OVRUN" : "", - casr & AC97C_CSR_RXRDY ? " RXRDY" : "", - casr & AC97C_CSR_UNRUN ? " UNRUN" : "", - casr & AC97C_CSR_TXEMPTY ? " TXEMPTY" : "", - casr & AC97C_CSR_TXRDY ? " TXRDY" : "", - !casr ? " NONE" : ""); + (casr & AC97C_CSR_OVRUN) ? " OVRUN" : "", + (casr & AC97C_CSR_RXRDY) ? " RXRDY" : "", + (casr & AC97C_CSR_UNRUN) ? " UNRUN" : "", + (casr & AC97C_CSR_TXEMPTY) ? " TXEMPTY" : "", + (casr & AC97C_CSR_TXRDY) ? " TXRDY" : "", + !casr ? " NONE" : ""); if ((casr & camr) & AC97C_CSR_ENDTX) { runtime = chip->playback_substream->runtime; block_size = frames_to_bytes(runtime, runtime->period_size); @@ -521,11 +521,11 @@ static irqreturn_t atmel_ac97c_interrupt(int irq, void *dev) if (sr & AC97C_SR_COEVT) { dev_info(&chip->pdev->dev, "codec channel event%s%s%s%s%s\n", - cosr & AC97C_CSR_OVRUN ? " OVRUN" : "", - cosr & AC97C_CSR_RXRDY ? " RXRDY" : "", - cosr & AC97C_CSR_TXEMPTY ? " TXEMPTY" : "", - cosr & AC97C_CSR_TXRDY ? " TXRDY" : "", - !cosr ? " NONE" : ""); + (cosr & AC97C_CSR_OVRUN) ? " OVRUN" : "", + (cosr & AC97C_CSR_RXRDY) ? " RXRDY" : "", + (cosr & AC97C_CSR_TXEMPTY) ? " TXEMPTY" : "", + (cosr & AC97C_CSR_TXRDY) ? " TXRDY" : "", + !cosr ? " NONE" : ""); retval = IRQ_HANDLED; } From patchwork Wed Sep 2 21:21:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 11751837 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6CDE514E3 for ; Wed, 2 Sep 2020 21:32:46 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 00F39207EA for ; Wed, 2 Sep 2020 21:32:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="okc9r+ta" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 00F39207EA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 2FB6B16D1; Wed, 2 Sep 2020 23:32:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2FB6B16D1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1599082364; bh=cVt1ytwYmi4GRu+YTKWAOYsDWM/+BgJLmEgriDEZ2ow=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=okc9r+ta4oRcPLIZldaep4O6gLOSPvNEmE6aiPptD2vlUkvRrK0H5D96lGAETaLpN 8rr/XpOEUMPDUwmU3VAbmjqsrtxfJj+XQGl8I56+kHqwBnimlgAkkxLr2DzwwaCEbV 2IJ75ECfQVIjT9a4fcu6h47wPThEIdPIYBH86Jlg= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 8D747F8034D; Wed, 2 Sep 2020 23:22:58 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id F1FA5F802DD; Wed, 2 Sep 2020 23:22:35 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_NONE, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 CEC93F802E7 for ; Wed, 2 Sep 2020 23:22:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CEC93F802E7 IronPort-SDR: LvdstWIZb6we3luQEfDAF8f77vd0D56EWl+NMQJVZI6+bvjGpIgVxRiW7+6Wq6SHYPzvt3YOXI WrVjGruwcG9w== X-IronPort-AV: E=McAfee;i="6000,8403,9732"; a="157482890" X-IronPort-AV: E=Sophos;i="5.76,384,1592895600"; d="scan'208";a="157482890" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 14:22:11 -0700 IronPort-SDR: CWNmw4lv8YHkbgCIbG4RKyJ46jaOkkoVX4XN88LaI5e6sppFQawZGTvYAYSNX/UEfNjS1XanPN J0XACPa/yKZw== X-IronPort-AV: E=Sophos;i="5.76,384,1592895600"; d="scan'208";a="477798294" Received: from rnagarat-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.212.56.27]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 14:22:10 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 15/18] ALSA: rawmidi: (cosmetic) align function parameters Date: Wed, 2 Sep 2020 16:21:30 -0500 Message-Id: <20200902212133.30964-16-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200902212133.30964-1-pierre-louis.bossart@linux.intel.com> References: <20200902212133.30964-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, vkoul@kernel.org, broonie@kernel.org, Pierre-Louis Bossart 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" fix cppcheck: sound/core/rawmidi.c:1711:49: style:inconclusive: Function 'snd_rawmidi_free' argument 1 names different: declaration 'rawmidi' definition 'rmidi'. [funcArgNamesDifferent] Signed-off-by: Pierre-Louis Bossart --- sound/core/rawmidi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/core/rawmidi.c b/sound/core/rawmidi.c index 2a688b711a9a..c78720a3299c 100644 --- a/sound/core/rawmidi.c +++ b/sound/core/rawmidi.c @@ -35,7 +35,7 @@ module_param_array(amidi_map, int, NULL, 0444); MODULE_PARM_DESC(amidi_map, "Raw MIDI device number assigned to 2nd OSS device."); #endif /* CONFIG_SND_OSSEMUL */ -static int snd_rawmidi_free(struct snd_rawmidi *rawmidi); +static int snd_rawmidi_free(struct snd_rawmidi *rmidi); static int snd_rawmidi_dev_free(struct snd_device *device); static int snd_rawmidi_dev_register(struct snd_device *device); static int snd_rawmidi_dev_disconnect(struct snd_device *device); From patchwork Wed Sep 2 21:21:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 11751833 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B1894109B for ; Wed, 2 Sep 2020 21:32:12 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 46950207EA for ; Wed, 2 Sep 2020 21:32:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="pZIS0MsE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 46950207EA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 C73C318AE; Wed, 2 Sep 2020 23:31:26 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C73C318AE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1599082330; bh=CJataQneuBbNELeYX1UOBctA4XXhTsruSPa8YnWLDS4=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=pZIS0MsE3Wekwsr26HKmb37viHn/2Jied4cls5OJS9B/e1y6en1YFvf2hNy9Z8zH+ YSeP2wxKzKv3WjOmEwwbNNShAAREq1fJQi6Xnm6yUTUlVqFvEcOA7zHASObg+rYJYJ 9blbKYpzrp8KMOf/KhNp6DSO/waZe8nZK6DRRrSQ= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id C5BB4F80349; Wed, 2 Sep 2020 23:22:57 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id E57D5F802E8; Wed, 2 Sep 2020 23:22:35 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_NONE, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 EEE7AF802DD for ; Wed, 2 Sep 2020 23:22:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz EEE7AF802DD IronPort-SDR: S6YA12XB/F5GYl8uWcHxlNsyE28ljhlnXsOw4PXOaX6mr/UTXt43AmkEZlL3Jpm3mcBInCNHg6 RBUFukKQVzPA== X-IronPort-AV: E=McAfee;i="6000,8403,9732"; a="157482892" X-IronPort-AV: E=Sophos;i="5.76,384,1592895600"; d="scan'208";a="157482892" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 14:22:11 -0700 IronPort-SDR: hdbw1Ox8Pe2E51dV6RREtHThge2PglqzkzsUo2bhK+V2py/Pc9hbGitBF+OYR1G108yY0ckmma NnMpq92/8u+A== X-IronPort-AV: E=Sophos;i="5.76,384,1592895600"; d="scan'208";a="477798295" Received: from rnagarat-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.212.56.27]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 14:22:11 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 16/18] ALSA: vx: vx_core: clarify operator precedence Date: Wed, 2 Sep 2020 16:21:31 -0500 Message-Id: <20200902212133.30964-17-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200902212133.30964-1-pierre-louis.bossart@linux.intel.com> References: <20200902212133.30964-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, vkoul@kernel.org, broonie@kernel.org, Pierre-Louis Bossart 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" Fix cppcheck warning sound/drivers/vx/vx_core.c:600:49: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] chip->chip_status & VX_STAT_XILINX_LOADED ? "Loaded" : "No"); ^ sound/drivers/vx/vx_core.c:602:47: style: Clarify calculation precedence for '&' and '?'. [clarifyCalculation] chip->chip_status & VX_STAT_DEVICE_INIT ? "Yes" : "No"); ^ Signed-off-by: Pierre-Louis Bossart --- sound/drivers/vx/vx_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/drivers/vx/vx_core.c b/sound/drivers/vx/vx_core.c index 26d591fe6a6b..d5c65cab195b 100644 --- a/sound/drivers/vx/vx_core.c +++ b/sound/drivers/vx/vx_core.c @@ -597,9 +597,9 @@ static void vx_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *b snd_iprintf(buffer, "%s\n", chip->card->longname); snd_iprintf(buffer, "Xilinx Firmware: %s\n", - chip->chip_status & VX_STAT_XILINX_LOADED ? "Loaded" : "No"); + (chip->chip_status & VX_STAT_XILINX_LOADED) ? "Loaded" : "No"); snd_iprintf(buffer, "Device Initialized: %s\n", - chip->chip_status & VX_STAT_DEVICE_INIT ? "Yes" : "No"); + (chip->chip_status & VX_STAT_DEVICE_INIT) ? "Yes" : "No"); snd_iprintf(buffer, "DSP audio info:"); if (chip->audio_info & VX_AUDIO_INFO_REAL_TIME) snd_iprintf(buffer, " realtime"); From patchwork Wed Sep 2 21:21:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 11751831 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 690FA109B for ; Wed, 2 Sep 2020 21:31:43 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id E7769207EA for ; Wed, 2 Sep 2020 21:31:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="sG9pdVzt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E7769207EA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 69E851738; Wed, 2 Sep 2020 23:30:57 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 69E851738 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1599082301; bh=rI5wkWYTb2OnqSAx7wDxN1HqlyIyqCd1r9dV29LRdaY=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=sG9pdVztkAWJYK8/ghsXBNxgLW5lUqCxKgVvDEri9drTxtWzXU1pEH4tAsfXwhD/1 OXEHyiuge3pSdKJd0thpL7HorGRxxi92HY6lOYRdfoPDVcC8KK+jaB6TdsAbb47vNq lOzVoIMEu6wAScF0DXYS4+m4DWv2p0b9yjd+Tn2I= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id F07B4F80345; Wed, 2 Sep 2020 23:22:56 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 996BBF802E3; Wed, 2 Sep 2020 23:22:35 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_NONE, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 B0DEEF802E8 for ; Wed, 2 Sep 2020 23:22:20 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B0DEEF802E8 IronPort-SDR: 7upAJpcGzAQniLVBerFel2ivwMLnX4l6iD5qeejGfndbSrEHlcvLRw1zDytzmmdjqPBDlcwG8E 2ts0st0ez3aQ== X-IronPort-AV: E=McAfee;i="6000,8403,9732"; a="157482900" X-IronPort-AV: E=Sophos;i="5.76,384,1592895600"; d="scan'208";a="157482900" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 14:22:12 -0700 IronPort-SDR: r1Eir6ecieuVQ3e3dBgjV7d1v69sVsBrD82GHw3RgBfZSOL5PxFd6IiYwNFgjGjhHh8MiYwRZf haXcrLJj/YMQ== X-IronPort-AV: E=Sophos;i="5.76,384,1592895600"; d="scan'208";a="477798297" Received: from rnagarat-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.212.56.27]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 14:22:11 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 17/18] ALSA: vx: vx_pcm: remove redundant assignment Date: Wed, 2 Sep 2020 16:21:32 -0500 Message-Id: <20200902212133.30964-18-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200902212133.30964-1-pierre-louis.bossart@linux.intel.com> References: <20200902212133.30964-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, vkoul@kernel.org, broonie@kernel.org, Pierre-Louis Bossart 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" Fix cppcheck warning: sound/drivers/vx/vx_pcm.c:539:30: style: Variable 'chip->playback_pipes[audio]' is reassigned a value before the old one has been used. [redundantAssignment] chip->playback_pipes[audio] = pipe; ^ sound/drivers/vx/vx_pcm.c:533:31: note: chip->playback_pipes[audio] is assigned chip->playback_pipes[audio] = pipe; ^ sound/drivers/vx/vx_pcm.c:539:30: note: chip->playback_pipes[audio] is overwritten chip->playback_pipes[audio] = pipe; ^ Signed-off-by: Pierre-Louis Bossart --- sound/drivers/vx/vx_pcm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sound/drivers/vx/vx_pcm.c b/sound/drivers/vx/vx_pcm.c index 664b9efa9a50..47361e26be80 100644 --- a/sound/drivers/vx/vx_pcm.c +++ b/sound/drivers/vx/vx_pcm.c @@ -530,7 +530,6 @@ static int vx_pcm_playback_open(struct snd_pcm_substream *subs) err = vx_alloc_pipe(chip, 0, audio, 2, &pipe); /* stereo playback */ if (err < 0) return err; - chip->playback_pipes[audio] = pipe; } /* open for playback */ pipe->references++; From patchwork Wed Sep 2 21:21:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 11751839 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 23E4114E3 for ; Wed, 2 Sep 2020 21:33:18 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id ABB02208C7 for ; Wed, 2 Sep 2020 21:33:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="BVBF3Vyc" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ABB02208C7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 44DA118B1; Wed, 2 Sep 2020 23:32:32 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 44DA118B1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1599082396; bh=CqmrUMauM8rqKjaeK1Ejk026cacGMeRhQaSRa3/taok=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=BVBF3Vyc7nskIaZhu+4nJTUPURaK1rn19riXK7X9JbQqYXlqs03fXMJwgpGenQVjB Mt4wQ/UgxnFUVx4tlU2NA6xlQmrc670lU6Bmnhk32umyvix2wLcsaSMN36TyGnCCur rMon437iXgrbGqmS5ap1yGTgAx9b0Jp3OTjNn2ME= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 7444EF8034F; Wed, 2 Sep 2020 23:22:59 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 51ED4F80268; Wed, 2 Sep 2020 23:22:36 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_NONE, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 BEBE0F80268 for ; Wed, 2 Sep 2020 23:22:21 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz BEBE0F80268 IronPort-SDR: pP1s6Un7XVSXC4vpgoJN+Y1IRK4yTLpEQ70Iu4EVSVxWBP4tv+yFjAlcW+/Cn5y4ibZxFdQlPA Ly14LoOOBw+g== X-IronPort-AV: E=McAfee;i="6000,8403,9732"; a="157482904" X-IronPort-AV: E=Sophos;i="5.76,384,1592895600"; d="scan'208";a="157482904" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 14:22:13 -0700 IronPort-SDR: 1IrBvyt2C9r/4xw8D04JqyY1B/SBCt8LjJReWECtMB5wFKgqBai56yJRR0hIUeCdp6yT0BabuZ JVzqOeu8x5fA== X-IronPort-AV: E=Sophos;i="5.76,384,1592895600"; d="scan'208";a="477798300" Received: from rnagarat-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.212.56.27]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Sep 2020 14:22:12 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 18/18] ALSA: vx: vx_pcm: remove redundant assignment Date: Wed, 2 Sep 2020 16:21:33 -0500 Message-Id: <20200902212133.30964-19-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200902212133.30964-1-pierre-louis.bossart@linux.intel.com> References: <20200902212133.30964-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, vkoul@kernel.org, broonie@kernel.org, Pierre-Louis Bossart 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" Fix cppcheck warning: sound/drivers/vx/vx_pcm.c:63:7: style: Variable 'buf' is assigned a value that is never used. [unreadVariable] buf = (unsigned char *)runtime->dma_area; ^ Signed-off-by: Pierre-Louis Bossart --- sound/drivers/vx/vx_pcm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sound/drivers/vx/vx_pcm.c b/sound/drivers/vx/vx_pcm.c index 47361e26be80..3d2e3bcafca8 100644 --- a/sound/drivers/vx/vx_pcm.c +++ b/sound/drivers/vx/vx_pcm.c @@ -60,7 +60,6 @@ static void vx_pcm_read_per_bytes(struct vx_core *chip, struct snd_pcm_runtime * *buf++ = vx_inb(chip, RXL); if (++offset >= pipe->buffer_bytes) { offset = 0; - buf = (unsigned char *)runtime->dma_area; } pipe->hw_ptr = offset; }