From patchwork Tue Jan 30 13:19:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 10191805 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 28B4060375 for ; Tue, 30 Jan 2018 13:20:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1AEB5201F5 for ; Tue, 30 Jan 2018 13:20:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0F6F728998; Tue, 30 Jan 2018 13:20:23 +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=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5E71D289B4 for ; Tue, 30 Jan 2018 13:20:15 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id C99DA2675F5; Tue, 30 Jan 2018 14:19:58 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 35A9F2671F2; Tue, 30 Jan 2018 14:19:55 +0100 (CET) Received: from baptiste.telenet-ops.be (baptiste.telenet-ops.be [195.130.132.51]) by alsa0.perex.cz (Postfix) with ESMTP id AA9D42671F2 for ; Tue, 30 Jan 2018 14:19:52 +0100 (CET) Received: from ayla.of.borg ([84.194.104.20]) by baptiste.telenet-ops.be with bizsmtp id 4dKp1x00N0SRDqC01dKpVQ; Tue, 30 Jan 2018 14:19:50 +0100 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.86_2) (envelope-from ) id 1egVpE-0002l2-V5; Tue, 30 Jan 2018 14:19:48 +0100 Received: from geert by ramsan with local (Exim 4.86_2) (envelope-from ) id 1egVpE-0003lI-Ns; Tue, 30 Jan 2018 14:19:48 +0100 From: Geert Uytterhoeven To: Bard Liao , Oder Chiou , Jaroslav Kysela , Takashi Iwai Date: Tue, 30 Jan 2018 14:19:42 +0100 Message-Id: <1517318383-14420-1-git-send-email-geert@linux-m68k.org> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, Arnd Bergmann , Liam Girdwood , linux-kernel@vger.kernel.org, Mark Brown , Geert Uytterhoeven Subject: [alsa-devel] [PATCH 1/2] ASoC: rt5514: Fix rt5514_spi_burst_read() buffer passing X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 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-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP rt5514_dsp_voice_wake_up_put() passes "(u8 *)&buf" to rt5514_spi_burst_read(), where the cast is needed to silence a compiler warning: sound/soc/codecs/rt5514.c: In function ‘rt5514_dsp_voice_wake_up_put’: sound/soc/codecs/rt5514.c:357: warning: passing argument 2 of ‘rt5514_spi_burst_read’ from incompatible pointer type However, as the variable is declared as an array ("u8 buf[8]"), the function should just pass "buf" instead. Fixes: fc9cab05837639ce ("ASoC: rt5514: The DSP clock can be calibrated by the other clock source") Signed-off-by: Geert Uytterhoeven --- sound/soc/codecs/rt5514.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/codecs/rt5514.c b/sound/soc/codecs/rt5514.c index 198df016802f826d..19f01558fbca677f 100644 --- a/sound/soc/codecs/rt5514.c +++ b/sound/soc/codecs/rt5514.c @@ -354,8 +354,7 @@ static int rt5514_dsp_voice_wake_up_put(struct snd_kcontrol *kcontrol, msleep(20); #if IS_ENABLED(CONFIG_SND_SOC_RT5514_SPI) rt5514_spi_burst_read(RT5514_PLL3_CALIB_CTRL6 | - RT5514_DSP_MAPPING, - (u8 *)&buf, sizeof(buf)); + RT5514_DSP_MAPPING, buf, sizeof(buf)); #else dev_err(codec->dev, "There is no SPI driver for" " loading the firmware\n");