]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
staging: ccree: add parentheses to macro argument
authorGilad Ben-Yossef <gilad@benyossef.com>
Thu, 1 Jun 2017 11:02:56 +0000 (14:02 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 3 Jun 2017 08:45:06 +0000 (17:45 +0900)
Add parentheses around macro argument to guard against precedence
issues.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ccree/cc_crypto_ctx.h

index 46b6f3f3193a803eabd77afd5a7334dff072e4af..1fc68defc59ca5bea2ac16970508c8fd100430a4 100644 (file)
@@ -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_ */