Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp829503imm; Wed, 1 Aug 2018 06:05:03 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd1RjkY8rroQp6uVvzVelmigHFnVbZOoSQjB+9JpnsKo+uuIYd7ftrmmB0KbNb2ocggNlRI X-Received: by 2002:a17:902:7898:: with SMTP id q24-v6mr23989023pll.222.1533128703790; Wed, 01 Aug 2018 06:05:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533128703; cv=none; d=google.com; s=arc-20160816; b=N/1mELNgVJhW/vBB6RiPToUph4OZT/aEpr19XTfya6ev+GqTdwI+ZzepSfHW9cuc93 l8cmSAN/D7Wv3xKNxQ5TLkYMf3mvMyW+Fm2diyJtdPAE0jUNQBspkzlxUn5Y2xPlnODa BC8r7RZ01w/qHLFs25cu77qcwM4r4pVwJ8+m06xF1c5gIsTluptI06C76hTmEniD1W+L 5DxGQgVQ5pFXWi1X0/9vunDxUiXfysTBt6D37ENOBqIUQ+hBPuUm6N4sOg6kyLX3sn4Q APMmNnQSvMROvPFWCbUxZ2FvReL3WWOHstl6SeFpW/Fnoao2c4QWbRVsyeZcBsyiGazJ FEkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:importance:content-transfer-encoding :mime-version:subject:message-id:cc:to:from:date :arc-authentication-results; bh=NPOc896H7E51jrBhA/JBDO4PZkMv6EU6GPNlLqN7P5g=; b=KlxqlC47lagn6rcnIUiat3uTGze1slIeQsfyQx0mXPCx2SMZ5gjPtL0qdIGfEDXGtU D5MNc1F0ingJTzOcN2jd/anhas1SP7NtCYoiQvxFaCodJJSQ0rubReKNqW/CHbeNltkK XTe+8Uj4BROn/WVLK/+kb9TCDRqdRx4KjFTvkvLAGGRetIdpjR1ISqZJIYKvx3inK5YY ytfbs+yXo2N8Aq1gHuE6W8HGIaFtt2CtggudGgKzeMwvfu7Jxs+EFjitAukpsOn9McMG yoZYKaLFhtYSxaEo2STTtlbPZwSIBu/xNaxNBFPsvDMpwklyfIhonfC0RK9xqL2BOJKd BuEw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m10-v6si16977067pfe.133.2018.08.01.06.04.48; Wed, 01 Aug 2018 06:05:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389305AbeHAOtb (ORCPT + 99 others); Wed, 1 Aug 2018 10:49:31 -0400 Received: from mx01-sz.bfs.de ([194.94.69.67]:54277 "EHLO mx01-sz.bfs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388930AbeHAOtb (ORCPT ); Wed, 1 Aug 2018 10:49:31 -0400 Received: from localhost (localhost [127.0.0.1]) by mx01-sz.bfs.de (Postfix) with ESMTP id DBC646017C; Wed, 1 Aug 2018 15:03:47 +0200 (CEST) X-Virus-Scanned: amavisd-new at bfs.de Received: from mx01-sz.bfs.de ([127.0.0.1]) by localhost (mx01-sz.bfs.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6NMHFo8n-J-F; Wed, 1 Aug 2018 15:03:47 +0200 (CEST) Received: from mail-sz.bfs.de (mail-sz.bfs.de [10.129.18.200]) by mx01-sz.bfs.de (Postfix) with ESMTPS; Wed, 1 Aug 2018 15:03:47 +0200 (CEST) Received: from null (ox-groupware01-sz.bfs.de [10.129.18.42]) by mail-sz.bfs.de (Postfix) with ESMTPS id EE2697F45D; Wed, 1 Aug 2018 15:03:45 +0200 (CEST) Date: Wed, 1 Aug 2018 15:03:45 +0200 (CEST) From: Walter Harms To: Jaroslav Kysela , Takashi Iwai , Jaya Kumar , alsa-devel@alsa-project.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Message-ID: <220787354.139798.1533128625826@ox-groupware.bfs.de> Subject: re: [PATCH 3/9] ALSA: emu10k1: remove redundant variable attn MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Medium X-Mailer: Open-Xchange Mailer v7.8.4-Rev31 X-Originating-Client: com.openexchange.ox.gui.dhtml Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King Variable attn is being assigned but is never used hence it is redundant and can be removed. Cleans up clang warning: warning: variable 'attn' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King --- sound/pci/emu10k1/emupcm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/pci/emu10k1/emupcm.c b/sound/pci/emu10k1/emupcm.c index 69f9b100bd24..26f6eda3e766 100644 --- a/sound/pci/emu10k1/emupcm.c +++ b/sound/pci/emu10k1/emupcm.c @@ -290,7 +290,7 @@ static void snd_emu10k1_pcm_init_voice(struct snd_emu10k1 *emu, struct snd_pcm_runtime *runtime = substream->runtime; unsigned int silent_page, tmp; int voice, stereo, w_16; - unsigned char attn, send_amount[8]; + unsigned char send_amount[8]; unsigned char send_routing[8]; unsigned long flags; unsigned int pitch_target; @@ -313,7 +313,6 @@ static void snd_emu10k1_pcm_init_voice(struct snd_emu10k1 *emu, /* volume parameters */ if (extra) { - attn = 0; memset(send_routing, 0, sizeof(send_routing)); send_routing[0] = 0; send_routing[1] = 1; IMHO, this code is a bit fishy. The memset() sould go in the init section and in the else branch tmp is set, maybe its an idea to set it here also (for symmetry) just my 2 cents, re, wh -- 2.17.1 -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html