All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: bcm2835-audio: Enclose complex macro value in parentheses
@ 2021-07-16  2:49 ` Diego Roux
  0 siblings, 0 replies; 3+ messages in thread
From: Diego Roux @ 2021-07-16  2:49 UTC (permalink / raw)
  Cc: Diego Roux, Greg Kroah-Hartman, Nicolas Saenz Julienne,
	Florian Fainelli, Ray Jui, Scott Branden,
	bcm-kernel-feedback-list, linux-staging, linux-rpi-kernel,
	linux-arm-kernel, linux-kernel

This patch fixes the checkpatch.pl error:

ERROR: Macros with complex values should be enclosed in parentheses

Signed-off-by: Diego Roux <me@diegoroux04.dynv6.net>
---
 drivers/staging/vc04_services/bcm2835-audio/bcm2835.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h
index 1b36475872d6..51066ac8eea5 100644
--- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h
+++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h
@@ -22,7 +22,7 @@ enum {
 /* macros for alsa2chip and chip2alsa, instead of functions */
 
 // convert alsa to chip volume (defined as macro rather than function call)
-#define alsa2chip(vol) (uint)(-(((vol) << 8) / 100))
+#define alsa2chip(vol) ((uint)(-(((vol) << 8) / 100)))
 
 // convert chip to alsa volume
 #define chip2alsa(vol) -(((vol) * 100) >> 8)
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] staging: bcm2835-audio: Enclose complex macro value in parentheses
@ 2021-07-16  2:49 ` Diego Roux
  0 siblings, 0 replies; 3+ messages in thread
From: Diego Roux @ 2021-07-16  2:49 UTC (permalink / raw)
  Cc: Diego Roux, Greg Kroah-Hartman, Nicolas Saenz Julienne,
	Florian Fainelli, Ray Jui, Scott Branden,
	bcm-kernel-feedback-list, linux-staging, linux-rpi-kernel,
	linux-arm-kernel, linux-kernel

This patch fixes the checkpatch.pl error:

ERROR: Macros with complex values should be enclosed in parentheses

Signed-off-by: Diego Roux <me@diegoroux04.dynv6.net>
---
 drivers/staging/vc04_services/bcm2835-audio/bcm2835.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h
index 1b36475872d6..51066ac8eea5 100644
--- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h
+++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h
@@ -22,7 +22,7 @@ enum {
 /* macros for alsa2chip and chip2alsa, instead of functions */
 
 // convert alsa to chip volume (defined as macro rather than function call)
-#define alsa2chip(vol) (uint)(-(((vol) << 8) / 100))
+#define alsa2chip(vol) ((uint)(-(((vol) << 8) / 100)))
 
 // convert chip to alsa volume
 #define chip2alsa(vol) -(((vol) * 100) >> 8)
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] staging: bcm2835-audio: Enclose complex macro value in parentheses
@ 2021-07-16  2:49 ` Diego Roux
  0 siblings, 0 replies; 3+ messages in thread
From: Diego Roux @ 2021-07-16  2:49 UTC (permalink / raw)
  Cc: Diego Roux, Greg Kroah-Hartman, Nicolas Saenz Julienne,
	Florian Fainelli, Ray Jui, Scott Branden,
	bcm-kernel-feedback-list, linux-staging, linux-rpi-kernel,
	linux-arm-kernel, linux-kernel

This patch fixes the checkpatch.pl error:

ERROR: Macros with complex values should be enclosed in parentheses

Signed-off-by: Diego Roux <me@diegoroux04.dynv6.net>
---
 drivers/staging/vc04_services/bcm2835-audio/bcm2835.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h
index 1b36475872d6..51066ac8eea5 100644
--- a/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h
+++ b/drivers/staging/vc04_services/bcm2835-audio/bcm2835.h
@@ -22,7 +22,7 @@ enum {
 /* macros for alsa2chip and chip2alsa, instead of functions */
 
 // convert alsa to chip volume (defined as macro rather than function call)
-#define alsa2chip(vol) (uint)(-(((vol) << 8) / 100))
+#define alsa2chip(vol) ((uint)(-(((vol) << 8) / 100)))
 
 // convert chip to alsa volume
 #define chip2alsa(vol) -(((vol) * 100) >> 8)
-- 
2.25.1



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-07-16  3:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-16  2:49 [PATCH] staging: bcm2835-audio: Enclose complex macro value in parentheses Diego Roux
2021-07-16  2:49 ` Diego Roux
2021-07-16  2:49 ` Diego Roux

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.