[alsa-devel] [PATCH 0/5] ASoC: SOF: IPC: style, logs and suspend improvements
4 mostly cosmetic patches and a nice one to force recovery on failed suspend
Dragos Tarcatu (1): ASOC: SOF: ipc: prevent logging trace messages
Kai Vehmanen (2): ASoC: SOF: intel: extend IPC dump information ASoC: SOF: ignore unrecoverable CTX_SAVE IPC errors at suspend
Pierre-Louis Bossart (2): ASoC: SOF: uapi: align comments with firmware files ASoC: SOF: ipc: clarify operator precedence
include/sound/sof/topology.h | 4 ++-- include/sound/sof/trace.h | 4 +++- sound/soc/sof/intel/cnl.c | 2 ++ sound/soc/sof/intel/hda.c | 29 +++++++++++++++++++++++++++++ sound/soc/sof/intel/hda.h | 2 ++ sound/soc/sof/ipc.c | 9 +++++---- sound/soc/sof/pm.c | 11 ++++++++++- 7 files changed, 53 insertions(+), 8 deletions(-)
From: Dragos Tarcatu dragos_tarcatu@mentor.com
If the firmware is set for verbose tracing, the kernel log is flooded with ipc rx/ipc rx done messages. Prevent logging those unless the verbose IPC debugging config option is set.
Signed-off-by: Dragos Tarcatu dragos_tarcatu@mentor.com Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com --- sound/soc/sof/ipc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sound/soc/sof/ipc.c b/sound/soc/sof/ipc.c index 558b596e2133..f3eb46bc808b 100644 --- a/sound/soc/sof/ipc.c +++ b/sound/soc/sof/ipc.c @@ -196,7 +196,8 @@ static void ipc_log_header(struct device *dev, u8 *text, u32 cmd) #else static inline void ipc_log_header(struct device *dev, u8 *text, u32 cmd) { - dev_dbg(dev, "%s: 0x%x\n", text, cmd); + if ((cmd & SOF_GLB_TYPE_MASK) != SOF_IPC_GLB_TRACE_MSG) + dev_dbg(dev, "%s: 0x%x\n", text, cmd); } #endif
The patch
ASOC: SOF: ipc: prevent logging trace messages
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.3
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks, Mark
From 4cee883e97b6095e23f5d72543da93e1506ff8c2 Mon Sep 17 00:00:00 2001
From: Dragos Tarcatu dragos_tarcatu@mentor.com Date: Wed, 12 Jun 2019 11:57:01 -0500 Subject: [PATCH] ASOC: SOF: ipc: prevent logging trace messages
If the firmware is set for verbose tracing, the kernel log is flooded with ipc rx/ipc rx done messages. Prevent logging those unless the verbose IPC debugging config option is set.
Signed-off-by: Dragos Tarcatu dragos_tarcatu@mentor.com Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/sof/ipc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sound/soc/sof/ipc.c b/sound/soc/sof/ipc.c index 558b596e2133..f3eb46bc808b 100644 --- a/sound/soc/sof/ipc.c +++ b/sound/soc/sof/ipc.c @@ -196,7 +196,8 @@ static void ipc_log_header(struct device *dev, u8 *text, u32 cmd) #else static inline void ipc_log_header(struct device *dev, u8 *text, u32 cmd) { - dev_dbg(dev, "%s: 0x%x\n", text, cmd); + if ((cmd & SOF_GLB_TYPE_MASK) != SOF_IPC_GLB_TRACE_MSG) + dev_dbg(dev, "%s: 0x%x\n", text, cmd); } #endif
No functional change, just mirror firmware comment changes
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com --- include/sound/sof/topology.h | 4 ++-- include/sound/sof/trace.h | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/include/sound/sof/topology.h b/include/sound/sof/topology.h index 4978999fd362..41dcabf89899 100644 --- a/include/sound/sof/topology.h +++ b/include/sound/sof/topology.h @@ -84,9 +84,9 @@ struct sof_ipc_buffer { struct sof_ipc_comp_config { struct sof_ipc_cmd_hdr hdr; uint32_t periods_sink; /**< 0 means variable */ - uint32_t periods_source; /**< 0 means variable */ + uint32_t periods_source;/**< 0 means variable */ uint32_t reserved1; /**< reserved */ - uint32_t frame_fmt; /**< SOF_IPC_FRAME_ */ + uint32_t frame_fmt; /**< SOF_IPC_FRAME_ */ uint32_t xrun_action;
/* reserved for future use */ diff --git a/include/sound/sof/trace.h b/include/sound/sof/trace.h index 2187ff7d07ce..9257d5473d97 100644 --- a/include/sound/sof/trace.h +++ b/include/sound/sof/trace.h @@ -66,7 +66,9 @@ struct sof_ipc_dma_trace_posn { #define SOF_IPC_PANIC_WFI (SOF_IPC_PANIC_MAGIC | 0xa) #define SOF_IPC_PANIC_ASSERT (SOF_IPC_PANIC_MAGIC | 0xb)
-/* panic info include filename and line number */ +/* panic info include filename and line number + * filename array will not include null terminator if fully filled + */ struct sof_ipc_panic_info { struct sof_ipc_hdr hdr; uint32_t code; /* SOF_IPC_PANIC_ */
The patch
ASoC: SOF: uapi: align comments with firmware files
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.3
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks, Mark
From b943f798011346589bd9ae994e5755e776756a31 Mon Sep 17 00:00:00 2001
From: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com Date: Wed, 12 Jun 2019 11:57:02 -0500 Subject: [PATCH] ASoC: SOF: uapi: align comments with firmware files
No functional change, just mirror firmware comment changes
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown broonie@kernel.org --- include/sound/sof/topology.h | 4 ++-- include/sound/sof/trace.h | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/include/sound/sof/topology.h b/include/sound/sof/topology.h index 4978999fd362..41dcabf89899 100644 --- a/include/sound/sof/topology.h +++ b/include/sound/sof/topology.h @@ -84,9 +84,9 @@ struct sof_ipc_buffer { struct sof_ipc_comp_config { struct sof_ipc_cmd_hdr hdr; uint32_t periods_sink; /**< 0 means variable */ - uint32_t periods_source; /**< 0 means variable */ + uint32_t periods_source;/**< 0 means variable */ uint32_t reserved1; /**< reserved */ - uint32_t frame_fmt; /**< SOF_IPC_FRAME_ */ + uint32_t frame_fmt; /**< SOF_IPC_FRAME_ */ uint32_t xrun_action;
/* reserved for future use */ diff --git a/include/sound/sof/trace.h b/include/sound/sof/trace.h index 2187ff7d07ce..9257d5473d97 100644 --- a/include/sound/sof/trace.h +++ b/include/sound/sof/trace.h @@ -66,7 +66,9 @@ struct sof_ipc_dma_trace_posn { #define SOF_IPC_PANIC_WFI (SOF_IPC_PANIC_MAGIC | 0xa) #define SOF_IPC_PANIC_ASSERT (SOF_IPC_PANIC_MAGIC | 0xb)
-/* panic info include filename and line number */ +/* panic info include filename and line number + * filename array will not include null terminator if fully filled + */ struct sof_ipc_panic_info { struct sof_ipc_hdr hdr; uint32_t code; /* SOF_IPC_PANIC_ */
From: Kai Vehmanen kai.vehmanen@linux.intel.com
Extend the HDA IPC dump implementation with status of key IRQ registers. This is useful to debug IPC timeouts and similar issues.
Signed-off-by: Kai Vehmanen kai.vehmanen@linux.intel.com Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com --- sound/soc/sof/intel/cnl.c | 2 ++ sound/soc/sof/intel/hda.c | 29 +++++++++++++++++++++++++++++ sound/soc/sof/intel/hda.h | 2 ++ 3 files changed, 33 insertions(+)
diff --git a/sound/soc/sof/intel/cnl.c b/sound/soc/sof/intel/cnl.c index 9a4927b6b6ae..d59305787fc3 100644 --- a/sound/soc/sof/intel/cnl.c +++ b/sound/soc/sof/intel/cnl.c @@ -168,6 +168,8 @@ static void cnl_ipc_dump(struct snd_sof_dev *sdev) u32 hipcida; u32 hipctdr;
+ hda_ipc_irq_dump(sdev); + /* read IPC status */ hipcida = snd_sof_dsp_read(sdev, HDA_DSP_BAR, CNL_DSP_REG_HIPCIDA); hipcctl = snd_sof_dsp_read(sdev, HDA_DSP_BAR, CNL_DSP_REG_HIPCCTL); diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c index a09dafa35fdb..140b1424f291 100644 --- a/sound/soc/sof/intel/hda.c +++ b/sound/soc/sof/intel/hda.c @@ -15,6 +15,9 @@ * Hardware interface for generic Intel audio DSP HDA IP */
+#include <sound/hdaudio_ext.h> +#include <sound/hda_register.h> + #include <linux/module.h> #include <sound/hdaudio_ext.h> #include <sound/sof.h> @@ -186,12 +189,38 @@ void hda_dsp_dump(struct snd_sof_dev *sdev, u32 flags) } }
+void hda_ipc_irq_dump(struct snd_sof_dev *sdev) +{ + struct hdac_bus *bus = sof_to_bus(sdev); + u32 adspis; + u32 intsts; + u32 intctl; + u32 ppsts; + u8 rirbsts; + + /* read key IRQ stats and config registers */ + adspis = snd_sof_dsp_read(sdev, HDA_DSP_BAR, HDA_DSP_REG_ADSPIS); + intsts = snd_sof_dsp_read(sdev, HDA_DSP_HDA_BAR, SOF_HDA_INTSTS); + intctl = snd_sof_dsp_read(sdev, HDA_DSP_HDA_BAR, SOF_HDA_INTCTL); + ppsts = snd_sof_dsp_read(sdev, HDA_DSP_PP_BAR, SOF_HDA_REG_PP_PPSTS); + rirbsts = snd_hdac_chip_readb(bus, RIRBSTS); + + dev_err(sdev->dev, + "error: hda irq intsts 0x%8.8x intlctl 0x%8.8x rirb %2.2x\n", + intsts, intctl, rirbsts); + dev_err(sdev->dev, + "error: dsp irq ppsts 0x%8.8x adspis 0x%8.8x\n", + ppsts, adspis); +} + void hda_ipc_dump(struct snd_sof_dev *sdev) { u32 hipcie; u32 hipct; u32 hipcctl;
+ hda_ipc_irq_dump(sdev); + /* read IPC status */ hipcie = snd_sof_dsp_read(sdev, HDA_DSP_BAR, HDA_DSP_REG_HIPCIE); hipct = snd_sof_dsp_read(sdev, HDA_DSP_BAR, HDA_DSP_REG_HIPCT); diff --git a/sound/soc/sof/intel/hda.h b/sound/soc/sof/intel/hda.h index 455046612b94..6c7dee2627d0 100644 --- a/sound/soc/sof/intel/hda.h +++ b/sound/soc/sof/intel/hda.h @@ -61,6 +61,7 @@ #define SOF_HDA_PP_CAP_ID 0x3 #define SOF_HDA_REG_PP_PPCH 0x10 #define SOF_HDA_REG_PP_PPCTL 0x04 +#define SOF_HDA_REG_PP_PPSTS 0x08 #define SOF_HDA_PPCTL_PIE BIT(31) #define SOF_HDA_PPCTL_GPROCEN BIT(30)
@@ -449,6 +450,7 @@ void hda_dsp_set_hw_params_upon_resume(struct snd_sof_dev *sdev); void hda_dsp_dump_skl(struct snd_sof_dev *sdev, u32 flags); void hda_dsp_dump(struct snd_sof_dev *sdev, u32 flags); void hda_ipc_dump(struct snd_sof_dev *sdev); +void hda_ipc_irq_dump(struct snd_sof_dev *sdev);
/* * DSP PCM Operations.
The patch
ASoC: SOF: intel: extend IPC dump information
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.3
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks, Mark
From f1fd9d0e6dbae9c7cdd7e82fe3055ec7b790abb6 Mon Sep 17 00:00:00 2001
From: Kai Vehmanen kai.vehmanen@linux.intel.com Date: Wed, 12 Jun 2019 11:57:03 -0500 Subject: [PATCH] ASoC: SOF: intel: extend IPC dump information
Extend the HDA IPC dump implementation with status of key IRQ registers. This is useful to debug IPC timeouts and similar issues.
Signed-off-by: Kai Vehmanen kai.vehmanen@linux.intel.com Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/sof/intel/cnl.c | 2 ++ sound/soc/sof/intel/hda.c | 29 +++++++++++++++++++++++++++++ sound/soc/sof/intel/hda.h | 2 ++ 3 files changed, 33 insertions(+)
diff --git a/sound/soc/sof/intel/cnl.c b/sound/soc/sof/intel/cnl.c index 9a4927b6b6ae..d59305787fc3 100644 --- a/sound/soc/sof/intel/cnl.c +++ b/sound/soc/sof/intel/cnl.c @@ -168,6 +168,8 @@ static void cnl_ipc_dump(struct snd_sof_dev *sdev) u32 hipcida; u32 hipctdr;
+ hda_ipc_irq_dump(sdev); + /* read IPC status */ hipcida = snd_sof_dsp_read(sdev, HDA_DSP_BAR, CNL_DSP_REG_HIPCIDA); hipcctl = snd_sof_dsp_read(sdev, HDA_DSP_BAR, CNL_DSP_REG_HIPCCTL); diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c index 47b508463218..af546e42e1d9 100644 --- a/sound/soc/sof/intel/hda.c +++ b/sound/soc/sof/intel/hda.c @@ -15,6 +15,9 @@ * Hardware interface for generic Intel audio DSP HDA IP */
+#include <sound/hdaudio_ext.h> +#include <sound/hda_register.h> + #include <linux/module.h> #include <sound/hdaudio_ext.h> #include <sound/sof.h> @@ -183,12 +186,38 @@ void hda_dsp_dump(struct snd_sof_dev *sdev, u32 flags) } }
+void hda_ipc_irq_dump(struct snd_sof_dev *sdev) +{ + struct hdac_bus *bus = sof_to_bus(sdev); + u32 adspis; + u32 intsts; + u32 intctl; + u32 ppsts; + u8 rirbsts; + + /* read key IRQ stats and config registers */ + adspis = snd_sof_dsp_read(sdev, HDA_DSP_BAR, HDA_DSP_REG_ADSPIS); + intsts = snd_sof_dsp_read(sdev, HDA_DSP_HDA_BAR, SOF_HDA_INTSTS); + intctl = snd_sof_dsp_read(sdev, HDA_DSP_HDA_BAR, SOF_HDA_INTCTL); + ppsts = snd_sof_dsp_read(sdev, HDA_DSP_PP_BAR, SOF_HDA_REG_PP_PPSTS); + rirbsts = snd_hdac_chip_readb(bus, RIRBSTS); + + dev_err(sdev->dev, + "error: hda irq intsts 0x%8.8x intlctl 0x%8.8x rirb %2.2x\n", + intsts, intctl, rirbsts); + dev_err(sdev->dev, + "error: dsp irq ppsts 0x%8.8x adspis 0x%8.8x\n", + ppsts, adspis); +} + void hda_ipc_dump(struct snd_sof_dev *sdev) { u32 hipcie; u32 hipct; u32 hipcctl;
+ hda_ipc_irq_dump(sdev); + /* read IPC status */ hipcie = snd_sof_dsp_read(sdev, HDA_DSP_BAR, HDA_DSP_REG_HIPCIE); hipct = snd_sof_dsp_read(sdev, HDA_DSP_BAR, HDA_DSP_REG_HIPCT); diff --git a/sound/soc/sof/intel/hda.h b/sound/soc/sof/intel/hda.h index 455046612b94..6c7dee2627d0 100644 --- a/sound/soc/sof/intel/hda.h +++ b/sound/soc/sof/intel/hda.h @@ -61,6 +61,7 @@ #define SOF_HDA_PP_CAP_ID 0x3 #define SOF_HDA_REG_PP_PPCH 0x10 #define SOF_HDA_REG_PP_PPCTL 0x04 +#define SOF_HDA_REG_PP_PPSTS 0x08 #define SOF_HDA_PPCTL_PIE BIT(31) #define SOF_HDA_PPCTL_GPROCEN BIT(30)
@@ -449,6 +450,7 @@ void hda_dsp_set_hw_params_upon_resume(struct snd_sof_dev *sdev); void hda_dsp_dump_skl(struct snd_sof_dev *sdev, u32 flags); void hda_dsp_dump(struct snd_sof_dev *sdev, u32 flags); void hda_ipc_dump(struct snd_sof_dev *sdev); +void hda_ipc_irq_dump(struct snd_sof_dev *sdev);
/* * DSP PCM Operations.
From: Kai Vehmanen kai.vehmanen@linux.intel.com
As part of the suspend flow, a context save IPC message is sent to the firmware before powering down the DSP. If errors are met, the suspend flow is aborted with current code.
Change the behaviour such that if firmware returns -EBUSY or -EAGAIN, return the error codes to PM core as before. The device is left in active state in this case.
If other errors are reported, print a warning but do not block the suspend flow. As per interface specification, no valid error can be returned in this scenario. If the hardware has hit a fatal error and is not able to respond successfully, best recovery method is to proceed with suspend and power off the DSP.
Signed-off-by: Kai Vehmanen kai.vehmanen@linux.intel.com Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com --- sound/soc/sof/pm.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/sound/soc/sof/pm.c b/sound/soc/sof/pm.c index 8ef1d51025d8..b7843f02ef67 100644 --- a/sound/soc/sof/pm.c +++ b/sound/soc/sof/pm.c @@ -343,11 +343,20 @@ static int sof_suspend(struct device *dev, bool runtime_suspend) #endif /* notify DSP of upcoming power down */ ret = sof_send_pm_ipc(sdev, SOF_IPC_PM_CTX_SAVE); - if (ret < 0) { + if (ret == -EBUSY || ret == -EAGAIN) { + /* + * runtime PM has logic to handle -EBUSY/-EAGAIN so + * pass these errors up + */ dev_err(sdev->dev, "error: ctx_save ipc error during suspend %d\n", ret); return ret; + } else if (ret < 0) { + /* FW in unexpected state, continue to power down */ + dev_warn(sdev->dev, + "ctx_save ipc error %d, proceeding with suspend\n", + ret); }
/* power down all DSP cores */
The patch
ASoC: SOF: ignore unrecoverable CTX_SAVE IPC errors at suspend
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.3
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks, Mark
From e2eba551d2f4226400a6bb7871fef439ad1318dd Mon Sep 17 00:00:00 2001
From: Kai Vehmanen kai.vehmanen@linux.intel.com Date: Wed, 12 Jun 2019 11:57:04 -0500 Subject: [PATCH] ASoC: SOF: ignore unrecoverable CTX_SAVE IPC errors at suspend
As part of the suspend flow, a context save IPC message is sent to the firmware before powering down the DSP. If errors are met, the suspend flow is aborted with current code.
Change the behaviour such that if firmware returns -EBUSY or -EAGAIN, return the error codes to PM core as before. The device is left in active state in this case.
If other errors are reported, print a warning but do not block the suspend flow. As per interface specification, no valid error can be returned in this scenario. If the hardware has hit a fatal error and is not able to respond successfully, best recovery method is to proceed with suspend and power off the DSP.
Signed-off-by: Kai Vehmanen kai.vehmanen@linux.intel.com Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/sof/pm.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/sound/soc/sof/pm.c b/sound/soc/sof/pm.c index 8ef1d51025d8..b7843f02ef67 100644 --- a/sound/soc/sof/pm.c +++ b/sound/soc/sof/pm.c @@ -343,11 +343,20 @@ static int sof_suspend(struct device *dev, bool runtime_suspend) #endif /* notify DSP of upcoming power down */ ret = sof_send_pm_ipc(sdev, SOF_IPC_PM_CTX_SAVE); - if (ret < 0) { + if (ret == -EBUSY || ret == -EAGAIN) { + /* + * runtime PM has logic to handle -EBUSY/-EAGAIN so + * pass these errors up + */ dev_err(sdev->dev, "error: ctx_save ipc error during suspend %d\n", ret); return ret; + } else if (ret < 0) { + /* FW in unexpected state, continue to power down */ + dev_warn(sdev->dev, + "ctx_save ipc error %d, proceeding with suspend\n", + ret); }
/* power down all DSP cores */
Cppcheck complains about the following warning, fix by adding parentheses
[sound/soc/sof/ipc.c:783]: (style) Clarify calculation precedence for '&' and '?'. [sound/soc/sof/ipc.c:785]: (style) Clarify calculation precedence for '&' and '?'. [sound/soc/sof/ipc.c:787]: (style) Clarify calculation precedence for '&' and '?'.
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com --- sound/soc/sof/ipc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/soc/sof/ipc.c b/sound/soc/sof/ipc.c index f3eb46bc808b..20dfca9c93b7 100644 --- a/sound/soc/sof/ipc.c +++ b/sound/soc/sof/ipc.c @@ -780,11 +780,11 @@ int snd_sof_ipc_valid(struct snd_sof_dev *sdev) " lock debug: %s\n" " lock vdebug: %s\n", v->build, v->date, v->time, - ready->flags & SOF_IPC_INFO_GDB ? + (ready->flags & SOF_IPC_INFO_GDB) ? "enabled" : "disabled", - ready->flags & SOF_IPC_INFO_LOCKS ? + (ready->flags & SOF_IPC_INFO_LOCKS) ? "enabled" : "disabled", - ready->flags & SOF_IPC_INFO_LOCKSV ? + (ready->flags & SOF_IPC_INFO_LOCKSV) ? "enabled" : "disabled"); }
The patch
ASoC: SOF: ipc: clarify operator precedence
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.3
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks, Mark
From 847a040dd2ebb39effcc6bd3a5157fbded65bce7 Mon Sep 17 00:00:00 2001
From: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com Date: Wed, 12 Jun 2019 11:57:05 -0500 Subject: [PATCH] ASoC: SOF: ipc: clarify operator precedence
Cppcheck complains about the following warning, fix by adding parentheses
[sound/soc/sof/ipc.c:783]: (style) Clarify calculation precedence for '&' and '?'. [sound/soc/sof/ipc.c:785]: (style) Clarify calculation precedence for '&' and '?'. [sound/soc/sof/ipc.c:787]: (style) Clarify calculation precedence for '&' and '?'.
Signed-off-by: Pierre-Louis Bossart pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/sof/ipc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/soc/sof/ipc.c b/sound/soc/sof/ipc.c index f3eb46bc808b..20dfca9c93b7 100644 --- a/sound/soc/sof/ipc.c +++ b/sound/soc/sof/ipc.c @@ -780,11 +780,11 @@ int snd_sof_ipc_valid(struct snd_sof_dev *sdev) " lock debug: %s\n" " lock vdebug: %s\n", v->build, v->date, v->time, - ready->flags & SOF_IPC_INFO_GDB ? + (ready->flags & SOF_IPC_INFO_GDB) ? "enabled" : "disabled", - ready->flags & SOF_IPC_INFO_LOCKS ? + (ready->flags & SOF_IPC_INFO_LOCKS) ? "enabled" : "disabled", - ready->flags & SOF_IPC_INFO_LOCKSV ? + (ready->flags & SOF_IPC_INFO_LOCKSV) ? "enabled" : "disabled"); }
participants (2)
-
Mark Brown
-
Pierre-Louis Bossart