Skip to contentSkip to conversation

ASoC: fsl_asrc: protect macro argument

PATCH Superseded Stefan Agner 3 participants 8 messages Aug 7, 2017 – Dec 6, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: fsl_asrc: protect macro argument

Protect macro argument with parentheses to avoid ambiguity.
This fixes a warning seen with clang:
warning: logical not is only applied to the left hand side of this comparison

---
 sound/soc/fsl/fsl_asrc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/fsl/fsl_asrc.h +1 -1
index 0f163abe4ba3..ec33dab4b909 100644
@@ -57,7 +57,7 @@
 #define REG_ASRDOC			0x74
 #define REG_ASRDI(i)			(REG_ASRDIA + (i << 3))
 #define REG_ASRDO(i)			(REG_ASRDOA + (i << 3))
-#define REG_ASRDx(x, i)			(x == IN ? REG_ASRDI(i) : REG_ASRDO(i))
+#define REG_ASRDx(x, i)			((x) == IN ? REG_ASRDI(i) : REG_ASRDO(i))
 
 #define REG_ASRIDRHA			0x80
 #define REG_ASRIDRLA			0x84
Signature · 1 line
2.13.3
reviewer Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Stefan Agner

Protect macro argument with parentheses to avoid ambiguity.
This fixes a warning seen with clang:
warning: logical not is only applied to the left hand side of this comparison

Thanks

Quoted 20 lines
---
 sound/soc/fsl/fsl_asrc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/fsl/fsl_asrc.h +1 -1
index 0f163abe4ba3..ec33dab4b909 100644
@@ -57,7 +57,7 @@
 #define REG_ASRDOC			0x74
 #define REG_ASRDI(i)			(REG_ASRDIA + (i << 3))
 #define REG_ASRDO(i)			(REG_ASRDOA + (i << 3))
-#define REG_ASRDx(x, i)			(x == IN ? REG_ASRDI(i) : REG_ASRDO(i))
+#define REG_ASRDx(x, i)			((x) == IN ? REG_ASRDI(i) : REG_ASRDO(i))
 
 #define REG_ASRIDRHA			0x80
 #define REG_ASRIDRLA			0x84
Signature · 1 line
2.13.3
#2 lore raw
Quoted 8 lines · Nicolin Chen
Quoted 5 lines · Stefan Agner

Protect macro argument with parentheses to avoid ambiguity.
This fixes a warning seen with clang:
warning: logical not is only applied to the left hand side of this comparison

Mark, you seem to have merged other patches for this driver, can you merge this one too?

--
Stefan

Quoted 23 lines

Thanks

Quoted 20 lines
---
 sound/soc/fsl/fsl_asrc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/fsl/fsl_asrc.h +1 -2
index 0f163abe4ba3..ec33dab4b909 100644
@@ -57,7 +57,7 @@
 #define REG_ASRDOC			0x74
 #define REG_ASRDI(i)			(REG_ASRDIA + (i << 3))
 #define REG_ASRDO(i)			(REG_ASRDOA + (i << 3))
-#define REG_ASRDx(x, i)			(x == IN ? REG_ASRDI(i) : REG_ASRDO(i))
+#define REG_ASRDx(x, i)			((x) == IN ? REG_ASRDI(i) : REG_ASRDO(i))
 
 #define REG_ASRIDRHA			0x80
 #define REG_ASRIDRLA			0x84
--

2.13.3

maintainer
#3 lore raw
Quoted 5 lines · Stefan Agner
Quoted 1 line · Nicolin Chen

On Sun, Aug 06, 2017 at 11:36:57PM -0700, Stefan Agner wrote:

Mark, you seem to have merged other patches for this driver, can you merge this one too?

Please don't send content free pings and please allow a reasonable time for review. People get busy, go on holiday, attend conferences and so on so unless there is some reason for urgency (like critical bug fixes) please allow at least a couple of weeks for review. If there have been review comments then people may be waiting for those to be addressed.

Sending content free pings adds to the mail volume (if they are seen at all) which is often the problem and since they can't be reviewed directly if something has gone wrong you'll have to resend the patches anyway, though there are some other maintainers who like them - if in doubt look at how patches for the subsystem are normally handled.

#4 lore raw
Quoted 4 lines · Mark Brown
Quoted 2 lines · Stefan Agner
Quoted 1 line · Nicolin Chen

On Sun, Aug 06, 2017 at 11:36:57PM -0700, Stefan Agner wrote:

Quoted 8 lines
Quoted 2 lines

Mark, you seem to have merged other patches for this driver, can you merge this one too?

Please don't send content free pings and please allow a reasonable time for review. People get busy, go on holiday, attend conferences and so on so unless there is some reason for urgency (like critical bug fixes) please allow at least a couple of weeks for review. If there have been review comments then people may be waiting for those to be addressed.

Well, it was not entirely content free since I added you/Liam to the list of recipient which I missed in the initial patch. I probably should have mentioned that.

I did not meant to bug people, just wanted to make sure the patch does not falls through the cracks... After all, patch as well as the Ack already more than 3 months old....

--
Stefan

maintainer
#5 lore raw
Quoted 11 lines · Stefan Agner
Quoted 5 lines · Mark Brown

Please don't send content free pings and please allow a reasonable time for review. People get busy, go on holiday, attend conferences and so on so unless there is some reason for urgency (like critical bug fixes) please allow at least a couple of weeks for review. If there have been review comments then people may be waiting for those to be addressed.

Well, it was not entirely content free since I added you/Liam to the list of recipient which I missed in the initial patch. I probably should have mentioned that.

Then it's definitely just a content free ping since I obviously don't have the patch if you didn't send it to me and as the mail you're replying to said you'll need to send me a copy.

Quoted 3 lines

I did not meant to bug people, just wanted to make sure the patch does not falls through the cracks... After all, patch as well as the Ack already more than 3 months old....

You need to send patches to the relevant maintainers as covered in SubmittingPatches, if you don't send us patches we won't have them and can't apply them.

#6 lore raw
Quoted 3 lines · Mark Brown
Quoted 1 line · Stefan Agner

On 2017-12-06 15:11, Mark Brown wrote:

[...]

Quoted 7 lines
Quoted 3 lines

I did not meant to bug people, just wanted to make sure the patch does not falls through the cracks... After all, patch as well as the Ack already more than 3 months old....

You need to send patches to the relevant maintainers as covered in SubmittingPatches, if you don't send us patches we won't have them and can't apply them.

Yeah this is where it gets a bit fuzzy around the affected file, there are maintainers mentioned in the MAINTAINER file but I just realized today that it was typically you which merged patches for the file.

Will resend the patch and add you as recipient.

--
Stefan

maintainer
#7 lore raw

Applied "ASoC: fsl_asrc: protect macro argument" to the asoc tree

In reply to Stefan Agner

The patch

ASoC: fsl_asrc: protect macro argument

has been applied to the asoc tree at

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git

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

Quoted 1 line

From d1b726a9018e3f684ce190a1cbe012cb64f363d8 Mon Sep 17 00:00:00 2001

From: Stefan Agner <[email protected]>
Date: Wed, 6 Dec 2017 16:17:27 +0100
Subject: [PATCH] ASoC: fsl_asrc: protect macro argument

Protect macro argument with parentheses to avoid ambiguity.
This fixes a warning seen with clang:
warning: logical not is only applied to the left hand side of this comparison

---
 sound/soc/fsl/fsl_asrc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/fsl/fsl_asrc.h +1 -1
index 0f163abe4ba3..ec33dab4b909 100644
@@ -57,7 +57,7 @@
 #define REG_ASRDOC			0x74
 #define REG_ASRDI(i)			(REG_ASRDIA + (i << 3))
 #define REG_ASRDO(i)			(REG_ASRDOA + (i << 3))
-#define REG_ASRDx(x, i)			(x == IN ? REG_ASRDI(i) : REG_ASRDO(i))
+#define REG_ASRDx(x, i)			((x) == IN ? REG_ASRDI(i) : REG_ASRDO(i))
 
 #define REG_ASRIDRHA			0x80
 #define REG_ASRIDRLA			0x84
Signature · 1 line
2.15.0