From patchwork Fri May 26 16:34:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 9750819 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 3A82360249 for ; Fri, 26 May 2017 16:42:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2B20A283BF for ; Fri, 26 May 2017 16:42:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1F6FB283F9; Fri, 26 May 2017 16:42:32 +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.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,T_DKIM_INVALID autolearn=no 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 626E0283BF for ; Fri, 26 May 2017 16:42:31 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 775C2266C5F; Fri, 26 May 2017 18:35:08 +0200 (CEST) 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 81207266C6D; Fri, 26 May 2017 18:35:06 +0200 (CEST) Received: from mail-pf0-f178.google.com (mail-pf0-f178.google.com [209.85.192.178]) by alsa0.perex.cz (Postfix) with ESMTP id 60F212668C9 for ; Fri, 26 May 2017 18:35:02 +0200 (CEST) Received: by mail-pf0-f178.google.com with SMTP id n23so16134344pfb.2 for ; Fri, 26 May 2017 09:35:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id; bh=lw9he4PSvPstsbuBp0Gqtd5uo8vYnqA4Ru+ArIC8K08=; b=EHLYWpW8NTBCtgK/g2nDdso1kf/BSxcz9TFOKGZ/Rpwj3rOiFucItE4mJd7smqDN3G X+KgOOAGSU8fawisywtueXi7jk/SwVst4Azf+cvPByciB6Vtw71DcT3stjVRl4W+ijV1 iG935SwOUGmATVimlrIUoZRuvm1PSLm6JOL9k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=lw9he4PSvPstsbuBp0Gqtd5uo8vYnqA4Ru+ArIC8K08=; b=Aqj/7ADWtQ/hpexb4qoLyC46cNSihjP4Kpu9xwsnXd19mI5KMUzjp3Ouv+d7ex+QA5 304B2vC4rlayk/sknYwIG8Sxg4xvow8SkC2kmI0LQFKDdnsdF2g/RaBl8afRK9MQKVmT BqanzQ3TMdweSqwONKHlCZoqrhsqeNluIJ7BUjyTChXnzyyCK0TnLLjQV1BnEgDC9o+y 3JpHrfgJRDs/p6XFLh4nbw6JZHTSvNdfo+a6QpxZdQw1o5b3ESvg8L8f61eg+Jz/di3f XhDZ/g09ihIs6YiR2c0oHlGuQa0Vipkp5hMMvQaVC434ldjT2TgHeXXaxOZSRcIpn7WR 8qmQ== X-Gm-Message-State: AODbwcAcROwvSUmr8UXbHOjDcjNRzfDtZM/JejTaSAcNxBIn8lOzz96V sSkk3QBM3yWya7EC X-Received: by 10.84.232.141 with SMTP id i13mr58707799plk.143.1495816500563; Fri, 26 May 2017 09:35:00 -0700 (PDT) Received: from tictac.mtv.corp.google.com ([172.22.65.76]) by smtp.gmail.com with ESMTPSA id r64sm2708467pfr.38.2017.05.26.09.34.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 26 May 2017 09:34:58 -0700 (PDT) From: Douglas Anderson To: Mark Brown Date: Fri, 26 May 2017 09:34:24 -0700 Message-Id: <20170526163424.2853-1-dianders@chromium.org> X-Mailer: git-send-email 2.13.0.219.gdb65acc882-goog Cc: alsa-devel@alsa-project.org, Douglas Anderson , lgirdwood@gmail.com, Vinod Koul , linux-kernel@vger.kernel.org, tiwai@suse.com, mka@chromium.org, colin.king@canonical.com, o-takashi@sakamocchi.jp, sebastien.guiriec@intel.com Subject: [alsa-devel] [RFC PATCH] ASoC: Intel: sst: Delete sst_save_shim64(); saved regs are never used 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 In commit 9a075265c6dc ("ASoC: Intel: sst: Remove unused function sst_restore_shim64()"), we deleted the sst_restore_shim64() since it was never used. ...but a quick look at the code shows that we should also be able to remove the sst_save_shim64() function and the structure members we were storing data in. Note that the saving code (and the comments talking about how important it is to do the save) has been around since commit 336cfbb05edf ("ASoC: Intel: mrfld- add ACPI module"). Signed-off-by: Douglas Anderson --- This problem was found only by code inspection and only compile tested. Hence, RFC. sound/soc/intel/atom/sst/sst.c | 19 ------------------- sound/soc/intel/atom/sst/sst.h | 2 -- 2 files changed, 21 deletions(-) diff --git a/sound/soc/intel/atom/sst/sst.c b/sound/soc/intel/atom/sst/sst.c index 2d43b8693c0c..5ee92257ca85 100644 --- a/sound/soc/intel/atom/sst/sst.c +++ b/sound/soc/intel/atom/sst/sst.c @@ -382,21 +382,6 @@ void sst_context_cleanup(struct intel_sst_drv *ctx) } EXPORT_SYMBOL_GPL(sst_context_cleanup); -static inline void sst_save_shim64(struct intel_sst_drv *ctx, - void __iomem *shim, - struct sst_shim_regs64 *shim_regs) -{ - unsigned long irq_flags; - - spin_lock_irqsave(&ctx->ipc_spin_lock, irq_flags); - - shim_regs->imrx = sst_shim_read64(shim, SST_IMRX); - shim_regs->csr = sst_shim_read64(shim, SST_CSR); - - - spin_unlock_irqrestore(&ctx->ipc_spin_lock, irq_flags); -} - void sst_configure_runtime_pm(struct intel_sst_drv *ctx) { pm_runtime_set_autosuspend_delay(ctx->dev, SST_SUSPEND_DELAY); @@ -416,8 +401,6 @@ void sst_configure_runtime_pm(struct intel_sst_drv *ctx) pm_runtime_set_active(ctx->dev); else pm_runtime_put_noidle(ctx->dev); - - sst_save_shim64(ctx, ctx->shim, ctx->shim_regs64); } EXPORT_SYMBOL_GPL(sst_configure_runtime_pm); @@ -441,8 +424,6 @@ static int intel_sst_runtime_suspend(struct device *dev) flush_workqueue(ctx->post_msg_wq); ctx->ops->reset(ctx); - /* save the shim registers because PMC doesn't save state */ - sst_save_shim64(ctx, ctx->shim, ctx->shim_regs64); return ret; } diff --git a/sound/soc/intel/atom/sst/sst.h b/sound/soc/intel/atom/sst/sst.h index 5c9a51cc77aa..d8cac09e8997 100644 --- a/sound/soc/intel/atom/sst/sst.h +++ b/sound/soc/intel/atom/sst/sst.h @@ -318,12 +318,10 @@ struct sst_ipc_reg { }; struct sst_shim_regs64 { - u64 csr; u64 pisr; u64 pimr; u64 isrx; u64 isrd; - u64 imrx; u64 imrd; u64 ipcx; u64 ipcd;