From patchwork Wed Feb 19 14:06:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liam Girdwood X-Patchwork-Id: 3681081 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9B0EEBF13A for ; Wed, 19 Feb 2014 14:07:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B3BFA201BA for ; Wed, 19 Feb 2014 14:07:35 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 5207320166 for ; Wed, 19 Feb 2014 14:07:34 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 4804A265618; Wed, 19 Feb 2014 15:07:33 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 78A0526535E; Wed, 19 Feb 2014 15:07:20 +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 804E726536C; Wed, 19 Feb 2014 15:07:19 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by alsa0.perex.cz (Postfix) with ESMTP id DE7EB2652CD for ; Wed, 19 Feb 2014 15:07:09 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by azsmga101.ch.intel.com with ESMTP; 19 Feb 2014 06:07:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,505,1389772800"; d="scan'208";a="477664546" Received: from paulonei-mobl.ger.corp.intel.com (HELO loki.ger.corp.intel.com) ([10.252.123.176]) by fmsmga001.fm.intel.com with ESMTP; 19 Feb 2014 06:06:55 -0800 From: Liam Girdwood To: Mark Brown Date: Wed, 19 Feb 2014 14:06:23 +0000 Message-Id: <1392818784-6248-1-git-send-email-liam.r.girdwood@linux.intel.com> X-Mailer: git-send-email 1.8.3.2 Cc: Takashi Iwai , Liam Girdwood , alsa-devel@alsa-project.org Subject: [alsa-devel] [PATCHv2] ASoC: Intel: Fix sparse warnings for firmware loader. 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Changes since V1 :- o Fixed sparse warning for block_module_remove o Fixed additional sparse warnings when building entire driver. Sparse gives us the following warnings on sst-firmware.c CHECK sound/soc/intel/sst-firmware.c sound/soc/intel/sst-firmware.c:39:34: warning: incorrect type in argument 1 (different address spaces) sound/soc/intel/sst-firmware.c:39:34: expected void volatile [noderef] *dst sound/soc/intel/sst-firmware.c:39:34: got void * sound/soc/intel/sst-firmware.c:417:36: warning: incorrect type in argument 1 (different address spaces) sound/soc/intel/sst-firmware.c:417:36: expected void *dest sound/soc/intel/sst-firmware.c:417:36: got void [noderef] * sound/soc/intel/sst-firmware.c:430:5: warning: symbol 'sst_block_module_remove' was not declared. Should it be static? and CC [M] sound/soc/intel/sst-dsp.o sound/soc/intel/sst-dsp-priv.h:271:53: warning: incorrect type in argument 3 (different address spaces) sound/soc/intel/sst-dsp-priv.h:271:53: expected void *src sound/soc/intel/sst-dsp-priv.h:271:53: got void [noderef] * sound/soc/intel/sst-dsp-priv.h:271:53: warning: incorrect type in argument 3 (different address spaces) sound/soc/intel/sst-dsp-priv.h:271:53: expected void *src sound/soc/intel/sst-dsp-priv.h:271:53: got void [noderef] * sound/soc/intel/sst-dsp-priv.h:271:53: warning: incorrect type in argument 3 (different address spaces) sound/soc/intel/sst-dsp-priv.h:271:53: expected void *src sound/soc/intel/sst-dsp-priv.h:271:53: got void [noderef] * This patch removes these warnings Signed-off-by: Liam Girdwood --- sound/soc/intel/sst-dsp-priv.h | 7 +++++-- sound/soc/intel/sst-firmware.c | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sound/soc/intel/sst-dsp-priv.h b/sound/soc/intel/sst-dsp-priv.h index 6135564..fe8e81a 100644 --- a/sound/soc/intel/sst-dsp-priv.h +++ b/sound/soc/intel/sst-dsp-priv.h @@ -41,8 +41,10 @@ struct sst_ops { u64 (*read64)(void __iomem *addr, u32 offset); /* DSP I/DRAM IO */ - void (*ram_read)(struct sst_dsp *sst, void *dest, void *src, size_t bytes); - void (*ram_write)(struct sst_dsp *sst, void *dest, void *src, size_t bytes); + void (*ram_read)(struct sst_dsp *sst, void *dest, void __iomem *src, + size_t bytes); + void (*ram_write)(struct sst_dsp *sst, void __iomem *dest, void *src, + size_t bytes); void (*dump)(struct sst_dsp *); @@ -296,6 +298,7 @@ struct sst_module *sst_module_get_from_id(struct sst_dsp *dsp, u32 id); struct sst_module *sst_mem_block_alloc_scratch(struct sst_dsp *dsp); void sst_mem_block_free_scratch(struct sst_dsp *dsp, struct sst_module *scratch); +int sst_block_module_remove(struct sst_module *module); /* Register the DSPs memory blocks - would be nice to read from ACPI */ struct sst_mem_block *sst_mem_block_register(struct sst_dsp *dsp, u32 offset, diff --git a/sound/soc/intel/sst-firmware.c b/sound/soc/intel/sst-firmware.c index 31cd154..dee7eb5 100644 --- a/sound/soc/intel/sst-firmware.c +++ b/sound/soc/intel/sst-firmware.c @@ -30,7 +30,7 @@ #include "sst-dsp.h" #include "sst-dsp-priv.h" -static void sst_memcpy32(void *dest, void *src, u32 bytes) +static void sst_memcpy32(volatile void __iomem *dest, void *src, u32 bytes) { u32 i;