Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp341917ybz; Fri, 17 Apr 2020 02:06:46 -0700 (PDT) X-Google-Smtp-Source: APiQypIayMtePs/vyTDypJtFhuAQEhpZ6n87E81zjAcCdXD5/KpG04k0SXOAZ7m62TRvqxFuHawa X-Received: by 2002:a50:b003:: with SMTP id i3mr1946804edd.303.1587114405937; Fri, 17 Apr 2020 02:06:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587114405; cv=none; d=google.com; s=arc-20160816; b=VkMsKlH+FCOw4+ApI6F+D3booh+2/tJ5Vy5UTef8lGEoku6xlk3PfGxsShykyVp0Os bF63P2CVXRZ+fD6IQ56xndSXoQGiwHNmJndmxuQlAbInN9/nPULNgVGVgNRyO+25EQGJ hDj3xvn39/oixS0p0kmzFsCHa8OsTh5LSp94xs4Rd6PnUzydL1s+pKx3A4osh+WZasmW cI2+uqptj3YZ/fD0YPqMDQn+KqPku6px5aOyzh0CAnY1dd5T4sVsv+JSCf8p/r51q+Ms 1rHIXxhageViOW+e/cjXE+U4BthjDYYFU5ITNSqDVrDgJg+y9rlsToBgFTK/Tcsm+zsP Yqqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:subject:cc:to:from:message-id :date; bh=g4CLfS8vCWL842FRBfKcOO8aLgltL9dj99kKlosgl4o=; b=QKTtEpvEWNsEH8Wc3+fjKVd1eU02V39liCQYeQEWa5/AUD5DZ8FbMABwKUcYcXKhTz lAmJ/1vMGBPYnp3OubUGzZFuP0iIWzXqjfmkgODn7lJ5Mh1uqJfFjsU//X+M2kum66p1 R+zNBV0DfFBFnbfOdSO7ci1opq4u/cskdZvL6VyBOlzLBMnJPlShB+sD9hXSi/ByF/lS C/KEk1Ws/Er57123stc0QqG4vgBquAq6hMZyVo3BYF93zdc87XCRA8E6RrSzJj8nCvCw 9Pqq7y66uB0SNFq7VwgiVMNC6ZmWT+9cAv4/sajrkEkWpDUrOH5ZJKfepemMnFq4AxII TfsQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s27si8090078eja.411.2020.04.17.02.06.23; Fri, 17 Apr 2020 02:06:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730113AbgDQJFJ (ORCPT + 99 others); Fri, 17 Apr 2020 05:05:09 -0400 Received: from mx2.suse.de ([195.135.220.15]:45134 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729920AbgDQJFJ (ORCPT ); Fri, 17 Apr 2020 05:05:09 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 92E8AAB76; Fri, 17 Apr 2020 09:05:06 +0000 (UTC) Date: Fri, 17 Apr 2020 11:05:06 +0200 Message-ID: From: Takashi Iwai To: Jason Yan Cc: , , , , , Hulk Robot Subject: Re: [PATCH] ALSA: au88x0: remove some dead code In-Reply-To: <20200417092232.13371-1-yanaijie@huawei.com> References: <20200417092232.13371-1-yanaijie@huawei.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 17 Apr 2020 11:22:32 +0200, Jason Yan wrote: > > Fix the following gcc warning: > > sound/pci/au88x0/au88x0_a3ddata.c:62:25: warning: ‘A3dHrirDImpulse’ > defined but not used [-Wunused-const-variable=] > static const a3d_Hrtf_t A3dHrirDImpulse = { > ^~~~~~~~~~~~~~~ > sound/pci/au88x0/au88x0_a3ddata.c:50:25: warning: ‘A3dHrirSatTest’ > defined but not used [-Wunused-const-variable=] > static const a3d_Hrtf_t A3dHrirSatTest = { > ^~~~~~~~~~~~~~ > sound/pci/au88x0/au88x0_a3ddata.c:33:25: warning: ‘A3dHrirOnes’ defined > but not used [-Wunused-const-variable=] > static const a3d_Hrtf_t A3dHrirOnes = { > ^~~~~~~~~~~ > > Reported-by: Hulk Robot > Signed-off-by: Jason Yan I'd rather keep them but disable with #if 0, if it's only about the minor compiler warnings. The whole code is a result of reverse engineering and those dead code are simply there just because of lack of testing. Removing makes it impossible for retesting (if any). thanks, Takashi > --- > sound/pci/au88x0/au88x0_a3d.c | 23 ------------------- > sound/pci/au88x0/au88x0_a3ddata.c | 38 ------------------------------- > 2 files changed, 61 deletions(-) > > diff --git a/sound/pci/au88x0/au88x0_a3d.c b/sound/pci/au88x0/au88x0_a3d.c > index 2db183f8826a..4d3b79a34c69 100644 > --- a/sound/pci/au88x0/au88x0_a3d.c > +++ b/sound/pci/au88x0/au88x0_a3d.c > @@ -512,31 +512,8 @@ static void a3dsrc_ProgramPipe(a3dsrc_t * a) > /* Single spike leads to identity transfer function. */ > a3dsrc_SetHrtfCurrent(a, A3dHrirImpulse, A3dHrirImpulse); > a3dsrc_SetHrtfTarget(a, A3dHrirImpulse, A3dHrirImpulse); > - > - /* Test: Sounds saturated. */ > - //a3dsrc_SetHrtfCurrent(a, A3dHrirSatTest, A3dHrirSatTest); > - //a3dsrc_SetHrtfTarget(a, A3dHrirSatTest, A3dHrirSatTest); > } > > -/* VDB = Vortex audio Dataflow Bus */ > -#if 0 > -static void a3dsrc_ClearVDBData(a3dsrc_t * a, unsigned long aa) > -{ > - vortex_t *vortex = (vortex_t *) (a->vortex); > - > - // ((aa >> 2) << 8) - (aa >> 2) > - hwwrite(vortex->mmio, > - a3d_addrS(a->slice, A3D_SLICE_VDBDest) + (a->source << 2), 0); > - hwwrite(vortex->mmio, > - a3d_addrS(a->slice, > - A3D_SLICE_VDBDest + 4) + (a->source << 2), 0); > - /* > - hwwrite(vortex->mmio, 0x19c00 + (((aa>>2)*255*4)+aa)*8, 0); > - hwwrite(vortex->mmio, 0x19c04 + (((aa>>2)*255*4)+aa)*8, 0); > - */ > -} > -#endif > - > /* A3D HwSource stuff. */ > > static void vortex_A3dSourceHw_Initialize(vortex_t * v, int source, int slice) > diff --git a/sound/pci/au88x0/au88x0_a3ddata.c b/sound/pci/au88x0/au88x0_a3ddata.c > index 18623cb6bc52..cc41ea67a6d3 100644 > --- a/sound/pci/au88x0/au88x0_a3ddata.c > +++ b/sound/pci/au88x0/au88x0_a3ddata.c > @@ -30,44 +30,6 @@ static const a3d_Hrtf_t A3dHrirImpulse = { > 0, 0, 0 > }; > > -static const a3d_Hrtf_t A3dHrirOnes = { > - 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, > - 0x7fff, > - 0x7fff, > - 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, > - 0x7fff, > - 0x7fff, > - 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, > - 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, > - 0x7fff, > - 0x7fff, > - 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, > - 0x7fff, > - 0x7fff, > - 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff > -}; > - > -static const a3d_Hrtf_t A3dHrirSatTest = { > - 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, 0x7fff, > - 0x7fff, > - 0x7fff, > - 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, 0x8001, > - 0x8001, > - 0x8001, > - 0x7fff, 0x0000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, > - 0, 0, 0, > - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 > -}; > - > -static const a3d_Hrtf_t A3dHrirDImpulse = { > - 0, 0x7fff, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, > - 0, 0, 0, > - 0, 0, 0, 0, > - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, > - 0, 0, 0, > - 0, 0, 0 > -}; > - > static const a3d_ItdDline_t A3dItdDlineZeros = { > 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, > 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 > -- > 2.21.1 >