From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935069AbcATK7k (ORCPT ); Wed, 20 Jan 2016 05:59:40 -0500 Received: from mout.kundenserver.de ([212.227.126.135]:51607 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932979AbcATK7i (ORCPT ); Wed, 20 Jan 2016 05:59:38 -0500 From: Arnd Bergmann To: Mark Brown Cc: Bard Liao , Oder Chiou , Liam Girdwood , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] ASoC: avoid unused variable warning for rt5659_acpi_match Date: Wed, 20 Jan 2016 11:58:51 +0100 Message-ID: <20191003.vNJkcIvuCq@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20160120104555.GY6588@sirena.org.uk> References: <2238845.aZnycJVYKR@wuerfel> <20160120104555.GY6588@sirena.org.uk> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:CkmYDyWP6IYEgXamgrTYOv434aCoy5DP1IzH3fxHkhM7VxdRsAm ylKwr8VtICZoHPVddZZhc9C5GXn9c3BXSyqgaHcOcR1a7mbrz/uY2SDAavfA9jmq9a0B/QE U9dUBqmC5PaCWZQN26bgCAxba45tD0NeUq+Ckkqvj/YQe8hxuZDA4rWGMY5K/VhO4Fs7KL3 ONg+axqh+1ZJf4CTfgpmg== X-UI-Out-Filterresults: notjunk:1;V01:K0:o/aSWcyy/qo=:LpnjVWcaBz8pyqQdcmFvLJ n9BKeEzzmY+hJLofDrIQyoyFDodNlmswDqq+ajVjpcu4k6V8b2+2fGrCC9O59aq7j7mJw4dFd SOweHBCqea8QxSi6Y4scffFDmDHyo+I6SX5llOX54JZYgYmtvoBY1APOIaIJrKWAI2zaeuNcj yh6MuWNdFxHjtZS5bCer3LS+u4MKpL7LG0v8QFpLYbEJrUUGu0JfXR6VpBfo6mxikLWwy7e0O sYlZEVESKxPvnk3wKpqFvyAf51UrAmp+GUJ2n+oB2F68QZy7hA+VHgSeGqTikdxbjZBMYu/bk /ssLI+njDtGgOppfiq3qNKgzEUW+jkfljjP7R4EzQEWTtsKN20plfpXYP8Xp+lLH62ojApNv7 DhC1n3EAWh3aY7TY8uXTqRkTjwXnMyRFHyYIXKjEv3TQRpvIzF0TYS3Q6M4a39dF2NksCCnfC QZKC4zTMllo5nNgKLfp6zqSZ/nYMDR8uYcITEgsuul5300hvhneC2YJJPbud6wDRT8wcHweqk X7gZwyyButXL7c3mLEDa3dI/S/tQsHh/rF9AmXGicXq4m+REhjMNxcd1OIiF/ZLOc4Pg4mueD 2BnO7REzgGt5YoALjdEmk+wQRlCOIJwoR8/iSXnKBEl6Yto9gHShxHf/eqxL+ULFf4B7iMk0X eLUEDP777Y/zLzCbCD35P8WhdanUx1dS+TgrUvM4ljWw1mdDQSVKljif8d+JTeDkpqDnq2NTz /439OuTdjoKUDMbI Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday 20 January 2016 10:45:55 Mark Brown wrote: > On Wed, Jan 20, 2016 at 11:43:48AM +0100, Arnd Bergmann wrote: > > The newly added rt5659 codec driver unconditionally defines an > > ACPI device match table but then uses ACPI_PTR() to remove the > > only reference to it, so we get a harmless build warning: > > > sound/soc/codecs/rt5659.c:4200:30: warning: 'rt5659_acpi_match' defined but not used [-Wunused-variable] > > static struct acpi_device_id rt5659_acpi_match[] = { > > > This removes the ACPI_PTR() to avoid the warning. > > Why is this a better fix than conditionally defining the table? I'm not overly fond of adding #ifdef if it can be avoided. In this case, both approaches seemed reasonable (either add an #ifdef or waste a couple of bytes), and I picked at random. I'll send you the alternative as well, please apply whichever one you prefer. Arnd