From patchwork Tue Jun 14 10:17:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102222 Delivered-To: patch@linaro.org Received: by 10.140.106.246 with SMTP id e109csp1966893qgf; Tue, 14 Jun 2016 03:16:34 -0700 (PDT) X-Received: by 10.36.28.136 with SMTP id c130mr6925243itc.90.1465899394473; Tue, 14 Jun 2016 03:16:34 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k26si28281638pfk.85.2016.06.14.03.16.33; Tue, 14 Jun 2016 03:16:34 -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 S1752314AbcFNKQb (ORCPT + 30 others); Tue, 14 Jun 2016 06:16:31 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:63531 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751703AbcFNKQa (ORCPT ); Tue, 14 Jun 2016 06:16:30 -0400 Received: from wuerfel.localnet ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue103) with ESMTPSA (Nemesis) id 0MRzqc-1b1Amf16Dq-00TDXB; Tue, 14 Jun 2016 12:16:19 +0200 From: Arnd Bergmann To: Mark Brown Cc: Liam Girdwood , Charles Keepax , Richard Fitzgerald , Nikesh Oswal , patches@opensource.wolfsonmicro.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] ASoC: remove one extraneous 'const' Date: Tue, 14 Jun 2016 12:17:52 +0200 Message-ID: <5926900.hCFXH4RQH6@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-22-generic; KDE/5.18.0; x86_64; ; ) MIME-Version: 1.0 X-Provags-ID: V03:K0:wYFNJcA8tbEU0zZA4MZZodtYQUq1A6pxd9h1wPgYC04v/T1JtCm 61r19ya4xCACJWDbpo7LBowvHNReCO960A5YuePHAbBLjUpqlQiiqZpaIzGmWR7h999V5C7 uos4BDHkmmty1MpxrQawBaARq7TlDTSi8/HVPK1YkeTFbF8g/KW6GUH+Wmt87Y/u9BZl/// RUBsvA0/N6uGw3ng6aWmQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:72lGL2P/8z8=:m59BtlQj+51br1u6GGGJeo KOav4pD9dNI+pdTS14p64J8xTkGojtWfL7Fobszh8YysHyJ2Sji/7Ck9Z/w896EOB9xNpe99x rWw1k/DfMELXnB8EI2ZUoanuCxQTSCBJP+AxB33z0Dj+GzrBdJfWpwf3TjixyancXxGZUGTLS Dlyn4rQ+Fh1V2ZliXXlbGBXlawg3pv+GXNaEMYvc0HHps3IaxSoYk74ILOgzbyKy537NDO9Xj bJGGxWvO+oS72N1/JHMzZhOobZF3srruRpojk3AVZRBS/rCmDARbe9E9Lcmq7N6PNI21Sb0d5 zLBCv/tqvhL6l2PrZDo2WT4ekQHYrwpYa4N8aiqc71CxPtHgat0qzXHnx48yKAmrZyYX/+Bc7 XAxGosxcdDl7reb4K8SrAoSDO0k4wds0k88UFcjqDIUqor0M0LY+lbyqmvJ7ixYzfq1YIP+ft IpZQEeF2g71M3WXxCheNLf+l2h2uIXK9iDfcG/vi4xkpXy1sR3t1HUdINWnP+v13OhcbBKQKl S1AWcuer2+mxRbG8ea6cmLgpLVtWxgNQ354T9KIwaAqsU7pIpSH8NktlkBMjIUip4pRyCB7qa JiNv1guDToFK3b217fxj+CETFJvdJ9B9uy5UVZfvwlO3IzR452jX14WeDmH62SuDrXWClQcu7 DhM1VnS1q/g6+o2SaoUdXu9QOKxuah3HaoBwQWPaoSFyv4pNt5nO3FvkQylWK0yqA7GUCtZO0 FMrfExBn5HvmedrT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A recent commit made a few arrays 'const', but also added the same attribute to a function return type, where it makes no sense, and we get a warning when building with W=1: sound/soc/codecs/arizona.c:1725:27: error: type qualifiers ignored on function return type [-Werror=ignored-qualifiers] static const char * const arizona_dai_clk_str(int clk_id) This removes it again. Signed-off-by: Arnd Bergmann Fixes: a3178a3ed798 ("ASoC: arizona: Add a couple of missing consts") --- This is one of two patches for warnings that were introduced first in today's linux-next. diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c index ed0425763755..ecfdbfcae366 100644 --- a/sound/soc/codecs/arizona.c +++ b/sound/soc/codecs/arizona.c @@ -1722,7 +1722,7 @@ restore_aif: return ret; } -static const char * const arizona_dai_clk_str(int clk_id) +static const char *arizona_dai_clk_str(int clk_id) { switch (clk_id) { case ARIZONA_CLK_SYSCLK: From patchwork Tue Jun 14 10:19:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102221 Delivered-To: patch@linaro.org Received: by 10.140.106.246 with SMTP id e109csp1967551qgf; Tue, 14 Jun 2016 03:18:28 -0700 (PDT) X-Received: by 10.66.80.134 with SMTP id r6mr27539577pax.66.1465899508243; Tue, 14 Jun 2016 03:18:28 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ag11si23582368pac.34.2016.06.14.03.18.27; Tue, 14 Jun 2016 03:18:28 -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 S1752478AbcFNKS0 (ORCPT + 30 others); Tue, 14 Jun 2016 06:18:26 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:59681 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751705AbcFNKSY (ORCPT ); Tue, 14 Jun 2016 06:18:24 -0400 Received: from wuerfel.localnet ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue102) with ESMTPSA (Nemesis) id 0MMWH0-1b4UlE0Lqo-008H5g; Tue, 14 Jun 2016 12:18:14 +0200 From: Arnd Bergmann To: Mark Brown Cc: Liam Girdwood , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, John Hsu , Ben Zhang Subject: [PATCH 2/2] ASoC: nau8825: mark pm functions __maybe_unused Date: Tue, 14 Jun 2016 12:19:31 +0200 Message-ID: <24871235.njqcnbLnL2@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-22-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <5926900.hCFXH4RQH6@wuerfel> References: <5926900.hCFXH4RQH6@wuerfel> MIME-Version: 1.0 X-Provags-ID: V03:K0:zBRzr0q+TIuVNncvHjPbuqKLjM1sZxTDgRYLh1g783slz6HSccA WuzRQ6sxjTXNLXuyz6+z9qLhGInWItvkmK7nQJYFAB8V86+lj5g2pN/DMicKeKdsU4tm5i8 dpoygryyZ5CfhTo0T1jY1VeS0Bzhm6RLymOWLsgnGic6QtW034SSY76/oNEX3QAiM5o7W9t h+CAE12cnakUVCKEjg+Yw== X-UI-Out-Filterresults: notjunk:1; V01:K0:Lpr+aFrmN4A=:ubuuZduqyXEfaZnYWmd7F+ uwqJL3HqvS1QNiNyJk+8Q5chrbH0Q5jSFkF/RuOtZY7WCWxM4ap59NcefTSJClWHVeJ+7G1R2 xnByb4nPnU7oZQLVo/wy6GvYioNOzmbXbR07auFWlx35Ju/dtLbxHyhhsTYeJgK+GWAoLTtQI snTmxZz9w+fzAuRsamm6afWlVeO4N3mszIH7i71evx99VaQxFqXOMSXxuRFG11/rJsEYlj9Cj fOcG5PGaJqxTQhaJUOwKlzqCFP7wjEQZ7V0iczGq6qcRPDTHuSRdtxzgRLwXNHZSP4TiH1VJ6 a2v6ElWRms0dIIPcSG9K/38zf1R7t073JD+GrNlCDh4GVrQhb8rjrljTj7u2VOqTmvlS8PvQi SUMT9SFGNXUzom7EkiTy0qwaB7C/MRzuRAIs27zx3yq2fUnIBkBKsq9UXDIWAk1XFx815Qw66 fhOoouofVD+NoRobBMpupWSSEeETKMnWNAFvAK5THuGFbUmcgTIdA1pNQQ5VrcnBlAGfIKbaG zEdghPYAmB6PNC2YtMC/M4GdfmFj/qWKhvyTsM1HZu9ngJdDDRY+mLYos9ehxMnMpvGSDVSWr ZUppzWauXJNyMXm3KoSfMylz+Ta+qQRh2sbFuEi+CoKYeUsCFCA/7r1+QDBuQP3xlbmA1oPPb Vx23NdUYdgZa8k5E/BLj0+ZhMNPsvu1onNf0v7JTPfj9oQJ6YGFDvBozq4cOv/j886XgojnLi 8N6duu/h42NkGabl Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Subject: [PATCH] ASoC: nau8825: mark pm functions __maybe_unused The newly added nau8825_dai_is_active() function is only called from the PM logic that is build-time conditional in this driver, so we get a warning when CONFIG_PM is disabled: sound/soc/codecs/nau8825.c:229:13: error: 'nau8825_dai_is_active' defined but not used [-Werror=unused-function] static bool nau8825_dai_is_active(struct nau8825 *nau8825) By replacing the #ifdef around the functions with a __maybe_unused annotation, the code becomes more robust to this kind of problem and we no longer get the warning while also slightly improving readability. Signed-off-by: Arnd Bergmann Fixes: b50455fab459 ("ASoC: nau8825: cross talk suppression measurement function") --- Like the first patch, this is for a warning that just appeared on today's linux-next. diff --git a/sound/soc/codecs/nau8825.c b/sound/soc/codecs/nau8825.c index 4b0a1b8d9405..3f30e6ed210c 100644 --- a/sound/soc/codecs/nau8825.c +++ b/sound/soc/codecs/nau8825.c @@ -2216,8 +2216,7 @@ static int nau8825_set_bias_level(struct snd_soc_codec *codec, return 0; } -#ifdef CONFIG_PM -static int nau8825_suspend(struct snd_soc_codec *codec) +static int __maybe_unused nau8825_suspend(struct snd_soc_codec *codec) { struct nau8825 *nau8825 = snd_soc_codec_get_drvdata(codec); @@ -2229,7 +2228,7 @@ static int nau8825_suspend(struct snd_soc_codec *codec) return 0; } -static int nau8825_resume(struct snd_soc_codec *codec) +static int __maybe_unused nau8825_resume(struct snd_soc_codec *codec) { struct nau8825 *nau8825 = snd_soc_codec_get_drvdata(codec); @@ -2253,10 +2252,6 @@ static int nau8825_resume(struct snd_soc_codec *codec) return 0; } -#else -#define nau8825_suspend NULL -#define nau8825_resume NULL -#endif static struct snd_soc_codec_driver nau8825_codec_driver = { .probe = nau8825_codec_probe,