Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Cezary Rojewski <cezary.rojewski@intel.com>
To: alsa-devel@alsa-project.org
Cc: pierre-louis.bossart@linux.intel.com,
	Cezary Rojewski <cezary.rojewski@intel.com>,
	andriy.shevchenko@linux.intel.com, filip.kaczmarski@intel.com,
	harshapriya.n@intel.com, marcin.barlik@intel.com,
	zwisler@google.com, lgirdwood@gmail.com, tiwai@suse.com,
	filip.proborszcz@intel.com, broonie@kernel.org,
	amadeuszx.slawinski@linux.intel.com, michal.wasko@intel.com,
	cujomalainey@chromium.org, krzysztof.hejmowski@intel.com,
	ppapierkowski@habana.ai, vamshi.krishna.gopal@intel.com
Subject: [PATCH v2 13/13] ASoC: Intel: Remove sst_dsp_get_thread_context
Date: Tue,  6 Oct 2020 08:49:07 +0200	[thread overview]
Message-ID: <20201006064907.16277-14-cezary.rojewski@intel.com> (raw)
In-Reply-To: <20201006064907.16277-1-cezary.rojewski@intel.com>

While sst_dsp_get_thread_context() is declared as solution-agnostic, it
is only used by /skylake/ solution. Majority of thread_context field
usages are direct accesses. Improve code cohesiveness and convert to
single usage model.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 sound/soc/intel/common/sst-dsp-priv.h | 5 -----
 sound/soc/intel/skylake/cnl-sst.c     | 2 +-
 sound/soc/intel/skylake/skl-sst-ipc.c | 2 +-
 3 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/sound/soc/intel/common/sst-dsp-priv.h b/sound/soc/intel/common/sst-dsp-priv.h
index 5a5ce5069f9f..de2b44568feb 100644
--- a/sound/soc/intel/common/sst-dsp-priv.h
+++ b/sound/soc/intel/common/sst-dsp-priv.h
@@ -98,9 +98,4 @@ struct sst_dsp {
 	struct snd_dma_buffer dmab;
 };
 
-static inline void *sst_dsp_get_thread_context(struct sst_dsp *sst)
-{
-	return sst->thread_context;
-}
-
 #endif
diff --git a/sound/soc/intel/skylake/cnl-sst.c b/sound/soc/intel/skylake/cnl-sst.c
index 355a7b116886..fcd8dff27ae8 100644
--- a/sound/soc/intel/skylake/cnl-sst.c
+++ b/sound/soc/intel/skylake/cnl-sst.c
@@ -311,7 +311,7 @@ static struct sst_ops cnl_ops = {
 static irqreturn_t cnl_dsp_irq_thread_handler(int irq, void *context)
 {
 	struct sst_dsp *dsp = context;
-	struct skl_dev *cnl = sst_dsp_get_thread_context(dsp);
+	struct skl_dev *cnl = dsp->thread_context;
 	struct sst_generic_ipc *ipc = &cnl->ipc;
 	struct skl_ipc_header header = {0};
 	u32 hipcida, hipctdr, hipctdd;
diff --git a/sound/soc/intel/skylake/skl-sst-ipc.c b/sound/soc/intel/skylake/skl-sst-ipc.c
index 667cdddc289f..7a425271b08b 100644
--- a/sound/soc/intel/skylake/skl-sst-ipc.c
+++ b/sound/soc/intel/skylake/skl-sst-ipc.c
@@ -489,7 +489,7 @@ void skl_ipc_process_reply(struct sst_generic_ipc *ipc,
 irqreturn_t skl_dsp_irq_thread_handler(int irq, void *context)
 {
 	struct sst_dsp *dsp = context;
-	struct skl_dev *skl = sst_dsp_get_thread_context(dsp);
+	struct skl_dev *skl = dsp->thread_context;
 	struct sst_generic_ipc *ipc = &skl->ipc;
 	struct skl_ipc_header header = {0};
 	u32 hipcie, hipct, hipcte;
-- 
2.17.1


  parent reply	other threads:[~2020-10-06  6:57 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-06  6:48 [PATCH v2 00/13] ASoC: Intel: Remove obsolete solutions and components Cezary Rojewski
2020-10-06  6:48 ` [PATCH v2 01/13] ASoC: Intel: Remove haswell solution Cezary Rojewski
2020-10-06  6:48 ` [PATCH v2 02/13] ASoC: Intel: Remove max98090 support for baytrail solution Cezary Rojewski
2020-10-06  6:48 ` [PATCH v2 03/13] ASoC: Intel: Remove rt5640 " Cezary Rojewski
2020-10-06  6:48 ` [PATCH v2 04/13] ASoC: Intel: Remove " Cezary Rojewski
2020-10-06  6:48 ` [PATCH v2 05/13] ASoC: Intel: Remove SST ACPI component Cezary Rojewski
2020-10-06  6:49 ` [PATCH v2 06/13] ASoC: Intel: Remove SST firmware components Cezary Rojewski
2020-10-06  6:49 ` [PATCH v2 07/13] ASoC: Intel: Skylake: Unassign ram_read and read_write ops Cezary Rojewski
2020-10-06  6:49 ` [PATCH v2 08/13] ASoC: Intel: Remove unused DSP operations Cezary Rojewski
2020-10-06  6:49 ` [PATCH v2 09/13] ASoC: Intel: Remove unused DSP interface fields Cezary Rojewski
2020-10-06  6:49 ` [PATCH v2 10/13] ASoC: Intel: Remove SST-legacy specific constants Cezary Rojewski
2020-10-06  6:49 ` [PATCH v2 11/13] ASoC: Intel: Make atom components independent of sst-dsp Cezary Rojewski
2020-10-06  6:49 ` [PATCH v2 12/13] ASoC: Intel: Remove sst_pdata structure Cezary Rojewski
2020-10-06  6:49 ` Cezary Rojewski [this message]
2020-10-06 12:22 ` [PATCH v2 00/13] ASoC: Intel: Remove obsolete solutions and components Liam Girdwood
2020-10-06 15:20   ` Pierre-Louis Bossart
2020-10-06 15:20 ` Mark Brown
2020-10-12  8:26 ` Hans de Goede
2020-10-12  9:09   ` Takashi Iwai
2020-10-12 11:36     ` Mark Brown
2020-10-12 11:53       ` Hans de Goede
2020-10-12 12:19         ` Rojewski, Cezary
2020-10-12 12:39         ` Mark Brown
2020-10-12  9:24   ` Rojewski, Cezary
2020-10-12  9:30     ` Hans de Goede

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201006064907.16277-14-cezary.rojewski@intel.com \
    --to=cezary.rojewski@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=amadeuszx.slawinski@linux.intel.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=cujomalainey@chromium.org \
    --cc=filip.kaczmarski@intel.com \
    --cc=filip.proborszcz@intel.com \
    --cc=harshapriya.n@intel.com \
    --cc=krzysztof.hejmowski@intel.com \
    --cc=lgirdwood@gmail.com \
    --cc=marcin.barlik@intel.com \
    --cc=michal.wasko@intel.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=ppapierkowski@habana.ai \
    --cc=tiwai@suse.com \
    --cc=vamshi.krishna.gopal@intel.com \
    --cc=zwisler@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox