Skip to contentSkip to conversation

ALSA: hda/ca0132: Remove double parentheses

PATCH Applied Matthias Kaehlcke 2 participants 2 messages Mar 15, 2017 – Mar 20, 2017 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: hda/ca0132: Remove double parentheses

The extra pairs of parantheses are not needed and causes clang to generate warnings like this:

sound/pci/hda/patch_ca0132.c:1171:14: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality]

        if ((buffer == NULL))
             ~~~~~~~^~~~~~~

sound/pci/hda/patch_ca0132.c:1171:14: note: remove extraneous parentheses around the comparison to silence this warning
if ((buffer == NULL))
~ ^ ~
sound/pci/hda/patch_ca0132.c:1171:14: note: use '=' to turn this equality comparison into an assignment

        if ((buffer == NULL))
---
 sound/pci/hda/patch_ca0132.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/pci/hda/patch_ca0132.c +2 -2
index 11b9b2f17a2e..9cc1bbbbef32 100644
@@ -1168,7 +1168,7 @@ static int dspio_write_multiple(struct hda_codec *codec,
 	int status = 0;
 	unsigned int count;
 
-	if ((buffer == NULL))
+	if (buffer == NULL)
 		return -EINVAL;
 
 	count = 0;
@@ -1210,7 +1210,7 @@ static int dspio_read_multiple(struct hda_codec *codec, unsigned int *buffer,
 	unsigned int skip_count;
 	unsigned int dummy;
 
-	if ((buffer == NULL))
+	if (buffer == NULL)
 		return -1;
 
 	count = 0;
Signature · 1 line
2.12.0.367.g23dc2f6d3c-goog
Applied
#1 lore raw
Quoted 7 lines · Matthias Kaehlcke

The extra pairs of parantheses are not needed and causes clang to generate warnings like this:

sound/pci/hda/patch_ca0132.c:1171:14: error: equality comparison with extraneous parentheses [-Werror,-Wparentheses-equality]

        if ((buffer == NULL))
             ~~~~~~~^~~~~~~
Quoted 7 lines

sound/pci/hda/patch_ca0132.c:1171:14: note: remove extraneous parentheses around the comparison to silence this warning
if ((buffer == NULL))
~ ^ ~
sound/pci/hda/patch_ca0132.c:1171:14: note: use '=' to turn this equality comparison into an assignment

        if ((buffer == NULL))

Applied, thanks.

Takashi