Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1600044 > unrolled thread

Coding Style fix in drivers/staging/fwserial

Started bymshan <educha997@gmail.com>
First post2017-03-14 07:10 +0100
Last post2017-03-14 10:50 +0100
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  Coding Style fix in drivers/staging/fwserial  mshan <educha997@gmail.com> - 2017-03-14 07:10 +0100
    [PATCH] Fixed a minor coding style warning. Arguments in the macros should be coverd in brackets to aviod any precedence issues. mshan <educha997@gmail.com> - 2017-03-14 07:10 +0100
      Re: [PATCH] Fixed a minor coding style warning. Arguments in the  macros should be coverd in brackets to aviod any precedence issues. Dan Carpenter <dan.carpenter@oracle.com> - 2017-03-14 10:50 +0100

#1600044 — Coding Style fix in drivers/staging/fwserial

Frommshan <educha997@gmail.com>
Date2017-03-14 07:10 +0100
SubjectCoding Style fix in drivers/staging/fwserial
Message-ID<tkNOG-4m0-3@gated-at.bofh.it>
Arguments in the macros should be coverd in brackets to aviod any 
precedence issues. Fixed it.

[toc] | [next] | [standalone]


#1600047 — [PATCH] Fixed a minor coding style warning. Arguments in the macros should be coverd in brackets to aviod any precedence issues.

Frommshan <educha997@gmail.com>
Date2017-03-14 07:10 +0100
Subject[PATCH] Fixed a minor coding style warning. Arguments in the macros should be coverd in brackets to aviod any precedence issues.
Message-ID<tkNOG-4m0-7@gated-at.bofh.it>
In reply to#1600044
Signed-off-by: mshan <mohsinshan1k@gmail.com>
---
 drivers/staging/fwserial/fwserial.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/fwserial/fwserial.c b/drivers/staging/fwserial/fwserial.c
index 41a49c8..d693c03 100644
--- a/drivers/staging/fwserial/fwserial.c
+++ b/drivers/staging/fwserial/fwserial.c
@@ -98,7 +98,7 @@ struct fwtty_transaction {
 	};
 };
 
-#define to_device(a, b)			(a->b)
+#define to_device(a, b)			((a)->(b))
 #define fwtty_err(p, fmt, ...)						\
 	dev_err(to_device(p, device), fmt, ##__VA_ARGS__)
 #define fwtty_info(p, fmt, ...)						\
-- 
2.7.4

[toc] | [prev] | [next] | [standalone]


#1600167 — Re: [PATCH] Fixed a minor coding style warning. Arguments in the macros should be coverd in brackets to aviod any precedence issues.

FromDan Carpenter <dan.carpenter@oracle.com>
Date2017-03-14 10:50 +0100
SubjectRe: [PATCH] Fixed a minor coding style warning. Arguments in the macros should be coverd in brackets to aviod any precedence issues.
Message-ID<tkRfA-6BP-25@gated-at.bofh.it>
In reply to#1600047
Didn't work.  Send the patch to yourself until you figure it out.

regards,
dan carpenter

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web