diff mbox series

[v2,06/20] staging: ccree: add parentheses to macro argument

Message ID 1496314993-30229-7-git-send-email-gilad@benyossef.com
State Accepted
Commit a0eee1b6dabd79019196fd1d1a66eeb93788867a
Headers show
Series additional driver cleanups | expand

Commit Message

Gilad Ben-Yossef June 1, 2017, 11:02 a.m. UTC
Add parentheses around macro argument to guard against precedence
issues.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>

---
 drivers/staging/ccree/cc_crypto_ctx.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.1.4
diff mbox series

Patch

diff --git a/drivers/staging/ccree/cc_crypto_ctx.h b/drivers/staging/ccree/cc_crypto_ctx.h
index 838e6e4..20f3f9f 100644
--- a/drivers/staging/ccree/cc_crypto_ctx.h
+++ b/drivers/staging/ccree/cc_crypto_ctx.h
@@ -280,7 +280,7 @@  struct drv_ctx_aead {
  * @type: Type of context structure
  * @member: Associated context field
  */
-#define GET_CTX_FIELD_ADDR(ctx, type, member) (ctx + offsetof(type, member))
+#define GET_CTX_FIELD_ADDR(ctx, type, member) ((ctx) + offsetof(type, member))
 
 #endif /* _CC_CRYPTO_CTX_H_ */