From patchwork Thu Jun 13 16:04:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 10992627 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E5F3913AD for ; Thu, 13 Jun 2019 16:05:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CE801206AF for ; Thu, 13 Jun 2019 16:05:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CCEF9212DA; Thu, 13 Jun 2019 16:05:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0F956212D5 for ; Thu, 13 Jun 2019 16:05:23 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 5B89B1804; Thu, 13 Jun 2019 18:04:31 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5B89B1804 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1560441921; bh=cTlsxPekY6E4FbsbPxOl9W2w3k3O7AfeA2TIg8ZGBgo=; h=From:To:Date:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=GT1JkxBmcsgpvnG1v+Ibfpe78y2AGkRIaVo6EU5aDAZ0iMZhg1LubZb0qT6HmYL+j LcEV6JPgow4Nt5Mru0zGZb7VrYWuiKDjpGw1V+3V8j0sFnd5kjn3lCRmEDxkpGcBgM N7OeXKKVMm9r4smUdRoKSGu6rHFQuBIdAeBQ5YJU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id D6B7AF896F1; Thu, 13 Jun 2019 18:04:30 +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 13DECF89703; Thu, 13 Jun 2019 18:04:29 +0200 (CEST) Received: from pokefinder.org (sauhun.de [88.99.104.3]) by alsa1.perex.cz (Postfix) with ESMTP id 8AC4AF8076F for ; Thu, 13 Jun 2019 18:04:26 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8AC4AF8076F Received: from localhost (p5486CF99.dip0.t-ipconnect.de [84.134.207.153]) by pokefinder.org (Postfix) with ESMTPSA id EB38D4A127B; Thu, 13 Jun 2019 18:04:25 +0200 (CEST) From: Wolfram Sang To: alsa-devel@alsa-project.org Date: Thu, 13 Jun 2019 18:04:23 +0200 Message-Id: <20190613160423.17097-1-wsa@the-dreams.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Cc: linux-kernel@vger.kernel.org, Takashi Iwai , Wolfram Sang Subject: [alsa-devel] [PATCH] ALSA: pci: echoaudio: remove variable which is a constant 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" X-Virus-Scanned: ClamAV using ClamSMTP Checking a variable which is always '1' has no use. Signed-off-by: Wolfram Sang --- Only build tested. Found by static code analysis of similar patterns. sound/pci/echoaudio/echoaudio_dsp.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sound/pci/echoaudio/echoaudio_dsp.c b/sound/pci/echoaudio/echoaudio_dsp.c index b181752b8481..50d4a87a6bb3 100644 --- a/sound/pci/echoaudio/echoaudio_dsp.c +++ b/sound/pci/echoaudio/echoaudio_dsp.c @@ -1058,7 +1058,6 @@ static int allocate_pipes(struct echoaudio *chip, struct audiopipe *pipe, { int i; u32 channel_mask; - char is_cyclic; dev_dbg(chip->card->dev, "allocate_pipes: ch=%d int=%d\n", pipe_index, interleave); @@ -1066,8 +1065,6 @@ static int allocate_pipes(struct echoaudio *chip, struct audiopipe *pipe, if (chip->bad_board) return -EIO; - is_cyclic = 1; /* This driver uses cyclic buffers only */ - for (channel_mask = i = 0; i < interleave; i++) channel_mask |= 1 << (pipe_index + i); if (chip->pipe_alloc_mask & channel_mask) { @@ -1078,8 +1075,8 @@ static int allocate_pipes(struct echoaudio *chip, struct audiopipe *pipe, chip->comm_page->position[pipe_index] = 0; chip->pipe_alloc_mask |= channel_mask; - if (is_cyclic) - chip->pipe_cyclic_mask |= channel_mask; + /* This driver uses cyclic buffers only */ + chip->pipe_cyclic_mask |= channel_mask; pipe->index = pipe_index; pipe->interleave = interleave; pipe->state = PIPE_STATE_STOPPED;