From patchwork Wed May 26 19:29:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 12282615 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6723EC47088 for ; Wed, 26 May 2021 19:31: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 D9A9E613D8 for ; Wed, 26 May 2021 19:31:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D9A9E613D8 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 66D2F16F5; Wed, 26 May 2021 21:30:24 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 66D2F16F5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1622057474; bh=uI5/gfGxvHXQu20+LImJJcEKf7DN8tdTZdEdOIwcQI4=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=DSc0guDUb+vrzrBwliRZPdxkUPV2h92r6PFBqXPbIvE6oJ+SYxpP6Gf52BHZLW55o BC57HCmF3ry0NpNDAWNJzBwuQcfxEW3kkNciEf3f6z7nV/Q010jAVky7ODJIc44Atj xPcfjzpuELdfeFKZz+YEoEcUyi0zS3Y6J4k7ya4M= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id AAFAFF80260; Wed, 26 May 2021 21:30:23 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5F301F8026B; Wed, 26 May 2021 21:30:22 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 0CFE8F8025C for ; Wed, 26 May 2021 21:30:12 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0CFE8F8025C IronPort-SDR: oVJMGj3SdqAGOB9UyODOxZ6H5sU6XsEqWi6LjV6jZ3PJU0/LNse7vMP2iVuubK2pv+k2lRARCN oo54MaBG1/mw== X-IronPort-AV: E=McAfee;i="6200,9189,9996"; a="266447554" X-IronPort-AV: E=Sophos;i="5.82,331,1613462400"; d="scan'208";a="266447554" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 May 2021 12:30:07 -0700 IronPort-SDR: PqBeF03cvn4rlp51qCx1CYMYbsb5zRtEcA93bz5n8TZbVyhJ1c3sEqPS9at6Is+plbqmI/ixrA JlHzLxe+UTJA== X-IronPort-AV: E=Sophos;i="5.82,331,1613462400"; d="scan'208";a="414587768" Received: from pmundle-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.254.181.158]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 May 2021 12:30:06 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 1/2] ALSA: drivers: opl3: fix useless self-comparison Date: Wed, 26 May 2021 14:29:56 -0500 Message-Id: <20210526192957.449515-1-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Cc: tiwai@suse.de, 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" Sparse throws the following warning: sound/drivers/opl3/opl3_midi.c:183:60: error: self-comparison always evaluates to false This is likely a 16+ year old confusion between vp2 and vp. Suggested-by: Takashi Iwai Signed-off-by: Pierre-Louis Bossart --- sound/drivers/opl3/opl3_midi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/drivers/opl3/opl3_midi.c b/sound/drivers/opl3/opl3_midi.c index eb23c55323ae..e1b69c65c3c8 100644 --- a/sound/drivers/opl3/opl3_midi.c +++ b/sound/drivers/opl3/opl3_midi.c @@ -180,8 +180,7 @@ static int opl3_get_voice(struct snd_opl3 *opl3, int instr_4op, if (vp2->state == SNDRV_OPL3_ST_ON_2OP) { /* kill two voices, EXPENSIVE */ bp++; - voice_time = (voice_time > vp->time) ? - voice_time : vp->time; + voice_time = max(voice_time, vp2->time); } } else { /* allocate 2op voice */ From patchwork Wed May 26 19:29:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierre-Louis Bossart X-Patchwork-Id: 12282625 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 21148C47082 for ; Wed, 26 May 2021 19:32: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 11F2F613D3 for ; Wed, 26 May 2021 19:32:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 11F2F613D3 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 040FB1720; Wed, 26 May 2021 21:31:15 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 040FB1720 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1622057525; bh=L8vGh0zuRYiuxgJNAi39v0Q+g888U666eeUGM/K/vTI=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=UnSk3fKHt8D8+4xv//Um1hCg1YaEtPeEvDKoMaov5boarCeaDrEos9TCdMe+OsM+2 h4wlzEoBItlBQPQuaQw1TW/fe3DYEevAUrta8sAaK4yYyldc7LZ6WQUVEXh/THTrD3 lZQpvF7ivwxTw2h6jG8Pmv+UhkpSdpcZk5jgcs14= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 734ACF8026F; Wed, 26 May 2021 21:30:27 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8B8F4F80264; Wed, 26 May 2021 21:30:23 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 03F21F800B1 for ; Wed, 26 May 2021 21:30:16 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 03F21F800B1 IronPort-SDR: tHAEL/TSNsEAtfE4ggm1JHKVjYaUnEedC2fci+6TAVYd6fhHjjtT72M/r75sy7SBeHRUeKqXLd KgFpwrTlh9sA== X-IronPort-AV: E=McAfee;i="6200,9189,9996"; a="266447561" X-IronPort-AV: E=Sophos;i="5.82,331,1613462400"; d="scan'208";a="266447561" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 May 2021 12:30:08 -0700 IronPort-SDR: fy/ecthK3LrWzv4+FMfO1NnpVm/KScDKwmEPyk7BaEYXsywrWh1DOKurVk1is2ccAz3YVL52uv 1BI6htnDjgrA== X-IronPort-AV: E=Sophos;i="5.82,331,1613462400"; d="scan'208";a="414587779" Received: from pmundle-mobl.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.254.181.158]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 May 2021 12:30:07 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Subject: [PATCH 2/2] ALSA: pci: lx6464es: remove useless self-comparison Date: Wed, 26 May 2021 14:29:57 -0500 Message-Id: <20210526192957.449515-2-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210526192957.449515-1-pierre-louis.bossart@linux.intel.com> References: <20210526192957.449515-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Cc: tiwai@suse.de, 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" Sparse throws the following warning: sound/pci/lx6464es/lx_core.c:677:34: error: self-comparison always evaluates to false This comparison and error message make no sense, let's remove them. Signed-off-by: Pierre-Louis Bossart --- sound/pci/lx6464es/lx_core.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sound/pci/lx6464es/lx_core.c b/sound/pci/lx6464es/lx_core.c index f884f5a6a61c..d3f58a3d17fb 100644 --- a/sound/pci/lx6464es/lx_core.c +++ b/sound/pci/lx6464es/lx_core.c @@ -674,10 +674,6 @@ int lx_stream_set_format(struct lx6464es *chip, struct snd_pcm_runtime *runtime, u32 pipe_cmd = PIPE_INFO_TO_CMD(is_capture, pipe); u32 channels = runtime->channels; - if (runtime->channels != channels) - dev_err(chip->card->dev, "channel count mismatch: %d vs %d", - runtime->channels, channels); - mutex_lock(&chip->msg_lock); lx_message_init(&chip->rmh, CMD_0C_DEF_STREAM);