Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1660266 > unrolled thread
| Started by | Takashi Iwai <tiwai@suse.de> |
|---|---|
| First post | 2017-06-07 23:50 +0200 |
| Last post | 2017-06-09 09:10 +0200 |
| Articles | 5 — 3 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH] ASoC: Intel: sst: Remove unused function sst_restore_shim64() Takashi Iwai <tiwai@suse.de> - 2017-06-07 23:50 +0200
Re: [PATCH] ASoC: Intel: sst: Remove unused function sst_restore_shim64() Matthias Kaehlcke <mka@chromium.org> - 2017-06-08 00:00 +0200
Re: [PATCH] ASoC: Intel: sst: Remove unused function sst_restore_shim64() Takashi Iwai <tiwai@suse.de> - 2017-06-08 09:10 +0200
Re: [PATCH] ASoC: Intel: sst: Remove unused function sst_restore_shim64() Vinod Koul <vinod.koul@intel.com> - 2017-06-09 05:40 +0200
Re: [PATCH] ASoC: Intel: sst: Remove unused function sst_restore_shim64() Takashi Iwai <tiwai@suse.de> - 2017-06-09 09:10 +0200
| From | Takashi Iwai <tiwai@suse.de> |
|---|---|
| Date | 2017-06-07 23:50 +0200 |
| Subject | Re: [PATCH] ASoC: Intel: sst: Remove unused function sst_restore_shim64() |
| Message-ID | <tPQZY-3HZ-15@gated-at.bofh.it> |
On Tue, 23 May 2017 02:12:58 +0200,
Matthias Kaehlcke wrote:
>
> Looks like the function has never been used since it was added by commit
> b0d94acd634a ("ASoC: Intel: mrfld - add shim save restore"). Removing it
> fixes the following warning when building with clang:
>
> sound/soc/intel/atom/sst/sst.c:360:20: error: unused function
> 'sst_restore_shim64' [-Werror,-Wunused-function]
>
> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Hmm, although this patch was already merged, I now think this is
rather a bug. If the restore is never executed, why the counterpart,
sst_save_shim64() is required at all at runtime suspend?
Vinod?
thanks,
Takashi
> ---
> sound/soc/intel/atom/sst/sst.c | 16 ----------------
> 1 file changed, 16 deletions(-)
>
> diff --git a/sound/soc/intel/atom/sst/sst.c b/sound/soc/intel/atom/sst/sst.c
> index f9ba71315e33..fb608d3a90c8 100644
> --- a/sound/soc/intel/atom/sst/sst.c
> +++ b/sound/soc/intel/atom/sst/sst.c
> @@ -397,22 +397,6 @@ static inline void sst_save_shim64(struct intel_sst_drv *ctx,
> spin_unlock_irqrestore(&ctx->ipc_spin_lock, irq_flags);
> }
>
> -static inline void sst_restore_shim64(struct intel_sst_drv *ctx,
> - void __iomem *shim,
> - struct sst_shim_regs64 *shim_regs)
> -{
> - unsigned long irq_flags;
> -
> - /*
> - * we only need to restore IMRX for this case, rest will be
> - * initialize by FW or driver when firmware is loaded
> - */
> - spin_lock_irqsave(&ctx->ipc_spin_lock, irq_flags);
> - sst_shim_write64(shim, SST_IMRX, shim_regs->imrx);
> - sst_shim_write64(shim, SST_CSR, shim_regs->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);
> --
> 2.13.0.303.g4ebf302169-goog
>
>
[toc] | [next] | [standalone]
| From | Matthias Kaehlcke <mka@chromium.org> |
|---|---|
| Date | 2017-06-08 00:00 +0200 |
| Subject | Re: [PATCH] ASoC: Intel: sst: Remove unused function sst_restore_shim64() |
| Message-ID | <tPR9E-3Ll-19@gated-at.bofh.it> |
| In reply to | #1660266 |
Hi Takashi,
El Wed, Jun 07, 2017 at 11:40:19PM +0200 Takashi Iwai ha dit:
> On Tue, 23 May 2017 02:12:58 +0200,
> Matthias Kaehlcke wrote:
> >
> > Looks like the function has never been used since it was added by commit
> > b0d94acd634a ("ASoC: Intel: mrfld - add shim save restore"). Removing it
> > fixes the following warning when building with clang:
> >
> > sound/soc/intel/atom/sst/sst.c:360:20: error: unused function
> > 'sst_restore_shim64' [-Werror,-Wunused-function]
> >
> > Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
>
> Hmm, although this patch was already merged, I now think this is
> rather a bug. If the restore is never executed, why the counterpart,
> sst_save_shim64() is required at all at runtime suspend?
Doug Anderson also noticed this and removed the function and struct
sst_shim_regs64:
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git/commit/?h=for-next&id=98cf2c03b467fa67df58cb52adeb85b425cabcb2
> > ---
> > sound/soc/intel/atom/sst/sst.c | 16 ----------------
> > 1 file changed, 16 deletions(-)
> >
> > diff --git a/sound/soc/intel/atom/sst/sst.c b/sound/soc/intel/atom/sst/sst.c
> > index f9ba71315e33..fb608d3a90c8 100644
> > --- a/sound/soc/intel/atom/sst/sst.c
> > +++ b/sound/soc/intel/atom/sst/sst.c
> > @@ -397,22 +397,6 @@ static inline void sst_save_shim64(struct intel_sst_drv *ctx,
> > spin_unlock_irqrestore(&ctx->ipc_spin_lock, irq_flags);
> > }
> >
> > -static inline void sst_restore_shim64(struct intel_sst_drv *ctx,
> > - void __iomem *shim,
> > - struct sst_shim_regs64 *shim_regs)
> > -{
> > - unsigned long irq_flags;
> > -
> > - /*
> > - * we only need to restore IMRX for this case, rest will be
> > - * initialize by FW or driver when firmware is loaded
> > - */
> > - spin_lock_irqsave(&ctx->ipc_spin_lock, irq_flags);
> > - sst_shim_write64(shim, SST_IMRX, shim_regs->imrx);
> > - sst_shim_write64(shim, SST_CSR, shim_regs->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);
[toc] | [prev] | [next] | [standalone]
| From | Takashi Iwai <tiwai@suse.de> |
|---|---|
| Date | 2017-06-08 09:10 +0200 |
| Message-ID | <tPZJU-16j-19@gated-at.bofh.it> |
| In reply to | #1660273 |
On Wed, 07 Jun 2017 23:53:29 +0200,
Matthias Kaehlcke wrote:
>
> Hi Takashi,
>
> El Wed, Jun 07, 2017 at 11:40:19PM +0200 Takashi Iwai ha dit:
>
> > On Tue, 23 May 2017 02:12:58 +0200,
> > Matthias Kaehlcke wrote:
> > >
> > > Looks like the function has never been used since it was added by commit
> > > b0d94acd634a ("ASoC: Intel: mrfld - add shim save restore"). Removing it
> > > fixes the following warning when building with clang:
> > >
> > > sound/soc/intel/atom/sst/sst.c:360:20: error: unused function
> > > 'sst_restore_shim64' [-Werror,-Wunused-function]
> > >
> > > Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> >
> > Hmm, although this patch was already merged, I now think this is
> > rather a bug. If the restore is never executed, why the counterpart,
> > sst_save_shim64() is required at all at runtime suspend?
>
> Doug Anderson also noticed this and removed the function and struct
> sst_shim_regs64:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git/commit/?h=for-next&id=98cf2c03b467fa67df58cb52adeb85b425cabcb2
Yes, I know. But I wonder it were a failure to remove before
confirming that.
thanks,
Takashi
>
> > > ---
> > > sound/soc/intel/atom/sst/sst.c | 16 ----------------
> > > 1 file changed, 16 deletions(-)
> > >
> > > diff --git a/sound/soc/intel/atom/sst/sst.c b/sound/soc/intel/atom/sst/sst.c
> > > index f9ba71315e33..fb608d3a90c8 100644
> > > --- a/sound/soc/intel/atom/sst/sst.c
> > > +++ b/sound/soc/intel/atom/sst/sst.c
> > > @@ -397,22 +397,6 @@ static inline void sst_save_shim64(struct intel_sst_drv *ctx,
> > > spin_unlock_irqrestore(&ctx->ipc_spin_lock, irq_flags);
> > > }
> > >
> > > -static inline void sst_restore_shim64(struct intel_sst_drv *ctx,
> > > - void __iomem *shim,
> > > - struct sst_shim_regs64 *shim_regs)
> > > -{
> > > - unsigned long irq_flags;
> > > -
> > > - /*
> > > - * we only need to restore IMRX for this case, rest will be
> > > - * initialize by FW or driver when firmware is loaded
> > > - */
> > > - spin_lock_irqsave(&ctx->ipc_spin_lock, irq_flags);
> > > - sst_shim_write64(shim, SST_IMRX, shim_regs->imrx);
> > > - sst_shim_write64(shim, SST_CSR, shim_regs->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);
>
[toc] | [prev] | [next] | [standalone]
| From | Vinod Koul <vinod.koul@intel.com> |
|---|---|
| Date | 2017-06-09 05:40 +0200 |
| Subject | Re: [PATCH] ASoC: Intel: sst: Remove unused function sst_restore_shim64() |
| Message-ID | <tQiWd-4HA-1@gated-at.bofh.it> |
| In reply to | #1660266 |
On Wed, Jun 07, 2017 at 11:40:19PM +0200, Takashi Iwai wrote:
> On Tue, 23 May 2017 02:12:58 +0200,
> Matthias Kaehlcke wrote:
> >
> > Looks like the function has never been used since it was added by commit
> > b0d94acd634a ("ASoC: Intel: mrfld - add shim save restore"). Removing it
> > fixes the following warning when building with clang:
> >
> > sound/soc/intel/atom/sst/sst.c:360:20: error: unused function
> > 'sst_restore_shim64' [-Werror,-Wunused-function]
> >
> > Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
>
> Hmm, although this patch was already merged, I now think this is
> rather a bug. If the restore is never executed, why the counterpart,
> sst_save_shim64() is required at all at runtime suspend?
>
> Vinod?
It was supposed to be required in early BYT boards. I do not seem to recall
why the call to sst_restore_shim64 was removed from resume routine, it was
there when we added it and due to file move git log is useless.
Any idea how to get changes to file before the file was moved?
> thanks,
>
> Takashi
>
> > ---
> > sound/soc/intel/atom/sst/sst.c | 16 ----------------
> > 1 file changed, 16 deletions(-)
> >
> > diff --git a/sound/soc/intel/atom/sst/sst.c b/sound/soc/intel/atom/sst/sst.c
> > index f9ba71315e33..fb608d3a90c8 100644
> > --- a/sound/soc/intel/atom/sst/sst.c
> > +++ b/sound/soc/intel/atom/sst/sst.c
> > @@ -397,22 +397,6 @@ static inline void sst_save_shim64(struct intel_sst_drv *ctx,
> > spin_unlock_irqrestore(&ctx->ipc_spin_lock, irq_flags);
> > }
> >
> > -static inline void sst_restore_shim64(struct intel_sst_drv *ctx,
> > - void __iomem *shim,
> > - struct sst_shim_regs64 *shim_regs)
> > -{
> > - unsigned long irq_flags;
> > -
> > - /*
> > - * we only need to restore IMRX for this case, rest will be
> > - * initialize by FW or driver when firmware is loaded
> > - */
> > - spin_lock_irqsave(&ctx->ipc_spin_lock, irq_flags);
> > - sst_shim_write64(shim, SST_IMRX, shim_regs->imrx);
> > - sst_shim_write64(shim, SST_CSR, shim_regs->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);
> > --
> > 2.13.0.303.g4ebf302169-goog
> >
> >
--
~Vinod
[toc] | [prev] | [next] | [standalone]
| From | Takashi Iwai <tiwai@suse.de> |
|---|---|
| Date | 2017-06-09 09:10 +0200 |
| Message-ID | <tQmds-6TG-13@gated-at.bofh.it> |
| In reply to | #1661897 |
On Fri, 09 Jun 2017 05:40:04 +0200,
Vinod Koul wrote:
>
> On Wed, Jun 07, 2017 at 11:40:19PM +0200, Takashi Iwai wrote:
> > On Tue, 23 May 2017 02:12:58 +0200,
> > Matthias Kaehlcke wrote:
> > >
> > > Looks like the function has never been used since it was added by commit
> > > b0d94acd634a ("ASoC: Intel: mrfld - add shim save restore"). Removing it
> > > fixes the following warning when building with clang:
> > >
> > > sound/soc/intel/atom/sst/sst.c:360:20: error: unused function
> > > 'sst_restore_shim64' [-Werror,-Wunused-function]
> > >
> > > Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> >
> > Hmm, although this patch was already merged, I now think this is
> > rather a bug. If the restore is never executed, why the counterpart,
> > sst_save_shim64() is required at all at runtime suspend?
> >
> > Vinod?
>
> It was supposed to be required in early BYT boards. I do not seem to recall
> why the call to sst_restore_shim64 was removed from resume routine, it was
> there when we added it and due to file move git log is useless.
>
> Any idea how to get changes to file before the file was moved?
Try to pass --follow option to git log.
sst_save_shim64() and sst_restore_shim64() were introduced at
b0d94acd634a5cff7fe5fc46131a23997e8d0f60
but not actually used.
The call of sst_save_shim64() was added in
336cfbb05edf7b122ea927dad6c746608723eb25
but already without the counter-part for restore.
thanks,
Takashi
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web