From 5b3e2d5d1ef94814533595b3ecf0809799decb12 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Mon, 23 Jul 2018 14:49:38 -0500 Subject: [PATCH 1/4] [SQUASHME] ASoC: SOF: Intel: hda: harden macro parameters use parenthesis to make checkpatch happy Signed-off-by: Pierre-Louis Bossart --- sound/soc/sof/intel/hda.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/sof/intel/hda.h b/sound/soc/sof/intel/hda.h index 7f63b454e07844..86ab6a6c3c1a69 100644 --- a/sound/soc/sof/intel/hda.h +++ b/sound/soc/sof/intel/hda.h @@ -119,7 +119,7 @@ #define HDA_DSP_DRSM_BAR 3 #define HDA_DSP_BAR 4 -#define SRAM_WINDOW_OFFSET(x) (0x80000 + x * 0x20000) +#define SRAM_WINDOW_OFFSET(x) (0x80000 + (x) * 0x20000) #define HDA_DSP_MBOX_OFFSET SRAM_WINDOW_OFFSET(0) @@ -266,7 +266,7 @@ * Mask for a given number of cores * nc = number of supported cores */ -#define SOF_DSP_CORES_MASK(nc) GENMASK((nc - 1), 0) +#define SOF_DSP_CORES_MASK(nc) GENMASK(((nc) - 1), 0) /* Intel HD Audio Inter-Processor Communication Registers for Cannonlake*/ #define CNL_DSP_IPC_BASE 0xc0 From 12d6b26adf760991b95e11429a0e9c61a7aff7f9 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Mon, 23 Jul 2018 14:50:46 -0500 Subject: [PATCH 2/4] [SQUASHME] ASoC: SOF: intel: hda-pcm: harden macro parameters Make checkpatch happy Signed-off-by: Pierre-Louis Bossart --- sound/soc/sof/intel/hda-pcm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sound/soc/sof/intel/hda-pcm.c b/sound/soc/sof/intel/hda-pcm.c index 0abb2e5778cae2..5511277985284d 100644 --- a/sound/soc/sof/intel/hda-pcm.c +++ b/sound/soc/sof/intel/hda-pcm.c @@ -34,11 +34,11 @@ #include "../ops.h" #include "hda.h" -#define SDnFMT_BASE(x) (x << 14) -#define SDnFMT_MULT(x) ((x - 1) << 11) -#define SDnFMT_DIV(x) ((x - 1) << 8) -#define SDnFMT_BITS(x) (x << 4) -#define SDnFMT_CHAN(x) (x << 0) +#define SDnFMT_BASE(x) ((x) << 14) +#define SDnFMT_MULT(x) (((x) - 1) << 11) +#define SDnFMT_DIV(x) (((x) - 1) << 8) +#define SDnFMT_BITS(x) ((x) << 4) +#define SDnFMT_CHAN(x) ((x) << 0) static inline u32 get_mult_div(struct snd_sof_dev *sdev, int rate) { From b53ea4cef4bba3f6858c0f4bc9dfce3663d280a0 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Mon, 23 Jul 2018 14:51:37 -0500 Subject: [PATCH 3/4] [SQUASHME] ASoC: SOF: Intel: shim.h: harden macro parameters make checkpatch happy Signed-off-by: Pierre-Louis Bossart --- sound/soc/sof/intel/shim.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sound/soc/sof/intel/shim.h b/sound/soc/sof/intel/shim.h index 512441387b1e32..b6481fc65b2de7 100644 --- a/sound/soc/sof/intel/shim.h +++ b/sound/soc/sof/intel/shim.h @@ -46,7 +46,7 @@ #define SHIM_CSR_RST (0x1 << 1) #define SHIM_CSR_SBCS0 (0x1 << 2) #define SHIM_CSR_SBCS1 (0x1 << 3) -#define SHIM_CSR_DCS(x) (x << 4) +#define SHIM_CSR_DCS(x) ((x) << 4) #define SHIM_CSR_DCS_MASK (0x7 << 4) #define SHIM_CSR_STALL (0x1 << 10) #define SHIM_CSR_S0IOCS (0x1 << 21) @@ -95,7 +95,7 @@ #define SHIM_BYT_IPCD_BUSY ((u64)0x1 << 63) /* CLKCTL */ -#define SHIM_CLKCTL_SMOS(x) (x << 24) +#define SHIM_CLKCTL_SMOS(x) ((x) << 24) #define SHIM_CLKCTL_MASK (3 << 24) #define SHIM_CLKCTL_DCPLCG BIT(18) #define SHIM_CLKCTL_SCOE1 BIT(17) @@ -106,11 +106,11 @@ #define SHIM_CSR2_SDFD_SSP1 BIT(2) /* LTRC */ -#define SHIM_LTRC_VAL(x) (x << 0) +#define SHIM_LTRC_VAL(x) ((x) << 0) /* HMDC */ -#define SHIM_HMDC_HDDA0(x) (x << 0) -#define SHIM_HMDC_HDDA1(x) (x << 7) +#define SHIM_HMDC_HDDA0(x) ((x) << 0) +#define SHIM_HMDC_HDDA1(x) ((x) << 7) #define SHIM_HMDC_HDDA_E0_CH0 1 #define SHIM_HMDC_HDDA_E0_CH1 2 #define SHIM_HMDC_HDDA_E0_CH2 4 From d21d006b71861fc6e3b9e01ff5c746aa318f9ae1 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Mon, 23 Jul 2018 14:52:35 -0500 Subject: [PATCH 4/4] [SQUASHME] ASoC: SOF: Intel: hda-dai: remove spurious lines Make checkpatch happy Signed-off-by: Pierre-Louis Bossart --- sound/soc/sof/intel/hda-dai.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sound/soc/sof/intel/hda-dai.c b/sound/soc/sof/intel/hda-dai.c index cca873fc86bc05..d5067db0d9f5c6 100644 --- a/sound/soc/sof/intel/hda-dai.c +++ b/sound/soc/sof/intel/hda-dai.c @@ -110,5 +110,3 @@ struct snd_soc_dai_driver skl_dai[] = { SNDRV_PCM_RATE_8000_192000, SKL_FORMATS), }, }; - -