Skip to content

Commit

Permalink
staging: bcm2835-audio: Enclose complex macro value in parentheses
Browse files Browse the repository at this point in the history
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>
Link: https://lore.kernel.org/r/20210716024909.39411-1-me@diegoroux04.dynv6.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Diego Roux authored and Greg Kroah-Hartman committed Jul 21, 2021
1 parent df00609 commit 571e589
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/vc04_services/bcm2835-audio/bcm2835.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 571e589

Please sign in to comment.