Skip to contentSkip to conversation

Staging: octeon-usb: fixed a macro coding style issue

PATCH In review Nicolas Del Piano 2 participants 2 messages Apr 25, 2014 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: octeon-usb: fixed a macro coding style issue

Fixed a coding style error, macros with comples values should be enclosed in parenthesis.

---
 drivers/staging/octeon-usb/octeon-hcd.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/octeon-usb/octeon-hcd.c +1 -1
index 8b8ce72..475ecc4 100644
@@ -246,7 +246,7 @@ enum cvmx_usb_pipe_flags {
 };
 
 /* Normal prefetch that use the pref instruction. */
-#define CVMX_PREFETCH(address, offset) asm volatile ("pref %[type], %[off](%[rbase])" : : [rbase] "d" (address), [off] "I" (offset), [type] "n" (0))
+#define (CVMX_PREFETCH(address, offset) asm volatile ("pref %[type], %[off](%[rbase])" : : [rbase] "d" (address), [off] "I" (offset), [type] "n" (0)))
 
 /* Maximum number of times to retry failed transactions */
 #define MAX_RETRIES		3

--
1.7.9.5

#1 lore raw

Hi,

Quoted 12 lines · Nicolas Del Piano

Fixed a coding style error, macros with comples values should be enclosed in parenthesis.

---
 drivers/staging/octeon-usb/octeon-hcd.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/octeon-usb/octeon-hcd.c +0 -0
index 8b8ce72..475ecc4 100644

drivers/staging/octeon-usb/octeon-hcd.c enum cvmx_usb_pipe_flags { · line 249

Quoted 5 lines
drivers/staging/octeon-usb/octeon-hcd.c +1 -1
@@ -246,7 +246,7 @@ enum cvmx_usb_pipe_flags {
 };
 
 /* Normal prefetch that use the pref instruction. */
-#define CVMX_PREFETCH(address, offset) asm volatile ("pref %[type], %[off](%[rbase])" : : [rbase] "d" (address), [off] "I" (offset), [type] "n" (0))
+#define (CVMX_PREFETCH(address, offset) asm volatile ("pref %[type], %[off](%[rbase])" : : [rbase] "d" (address), [off] "I" (offset), [type] "n" (0)))

Not that way around! :-)

The parantheses should be around the code block not the name block.

Signature · 3 lines
Regards,
Levente Kurusa
PGP: 4EF5D641