* [PATCH] netfilter: nf_conntrack: fix checkpatch errors
@ 2014-06-03 14:45 Luca Ellero
2014-06-03 16:58 ` Sergei Shtylyov
2014-06-03 20:48 ` Patrick McHardy
0 siblings, 2 replies; 4+ messages in thread
From: Luca Ellero @ 2014-06-03 14:45 UTC (permalink / raw)
To: netfilter; +Cc: pablo, kaber, kadlec, davem, coreteam, netdev, Luca Ellero
Add parenthesis around complex macros
Signed-off-by: Luca Ellero <luca.ellero@brickedbrain.com>
---
net/netfilter/nf_conntrack_pptp.c | 6 +++---
net/netfilter/nf_conntrack_proto_sctp.c | 8 ++++----
net/netfilter/nf_conntrack_proto_tcp.c | 8 ++++----
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/net/netfilter/nf_conntrack_pptp.c b/net/netfilter/nf_conntrack_pptp.c
index 825c3e3..a505263 100644
--- a/net/netfilter/nf_conntrack_pptp.c
+++ b/net/netfilter/nf_conntrack_pptp.c
@@ -92,9 +92,9 @@ const char *const pptp_msg_name[] = {
EXPORT_SYMBOL(pptp_msg_name);
#endif
-#define SECS *HZ
-#define MINS * 60 SECS
-#define HOURS * 60 MINS
+#define SECS (*HZ)
+#define MINS (*60 SECS)
+#define HOURS (*60 MINS)
#define PPTP_GRE_TIMEOUT (10 MINS)
#define PPTP_GRE_STREAM_TIMEOUT (5 HOURS)
diff --git a/net/netfilter/nf_conntrack_proto_sctp.c b/net/netfilter/nf_conntrack_proto_sctp.c
index 1314d33..387cda5 100644
--- a/net/netfilter/nf_conntrack_proto_sctp.c
+++ b/net/netfilter/nf_conntrack_proto_sctp.c
@@ -44,10 +44,10 @@ static const char *const sctp_conntrack_names[] = {
"SHUTDOWN_ACK_SENT",
};
-#define SECS * HZ
-#define MINS * 60 SECS
-#define HOURS * 60 MINS
-#define DAYS * 24 HOURS
+#define SECS (*HZ)
+#define MINS (*60 SECS)
+#define HOURS (*60 MINS)
+#define DAYS (*24 HOURS)
static unsigned int sctp_timeouts[SCTP_CONNTRACK_MAX] __read_mostly = {
[SCTP_CONNTRACK_CLOSED] = 10 SECS,
diff --git a/net/netfilter/nf_conntrack_proto_tcp.c b/net/netfilter/nf_conntrack_proto_tcp.c
index 44d1ea3..6a7d6f8 100644
--- a/net/netfilter/nf_conntrack_proto_tcp.c
+++ b/net/netfilter/nf_conntrack_proto_tcp.c
@@ -63,10 +63,10 @@ static const char *const tcp_conntrack_names[] = {
"SYN_SENT2",
};
-#define SECS * HZ
-#define MINS * 60 SECS
-#define HOURS * 60 MINS
-#define DAYS * 24 HOURS
+#define SECS (*HZ)
+#define MINS (*60 SECS)
+#define HOURS (*60 MINS)
+#define DAYS (*24 HOURS)
static unsigned int tcp_timeouts[TCP_CONNTRACK_TIMEOUT_MAX] __read_mostly = {
[TCP_CONNTRACK_SYN_SENT] = 2 MINS,
--
1.7.10.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] netfilter: nf_conntrack: fix checkpatch errors
2014-06-03 14:45 [PATCH] netfilter: nf_conntrack: fix checkpatch errors Luca Ellero
@ 2014-06-03 16:58 ` Sergei Shtylyov
2014-06-03 20:48 ` Patrick McHardy
1 sibling, 0 replies; 4+ messages in thread
From: Sergei Shtylyov @ 2014-06-03 16:58 UTC (permalink / raw)
To: Luca Ellero, netfilter; +Cc: pablo, kaber, kadlec, davem, coreteam, netdev
Hello.
On 06/03/2014 06:45 PM, Luca Ellero wrote:
> Add parenthesis around complex macros
You should have thought a bit before doing that... :-)
> Signed-off-by: Luca Ellero <luca.ellero@brickedbrain.com>
> ---
> net/netfilter/nf_conntrack_pptp.c | 6 +++---
> net/netfilter/nf_conntrack_proto_sctp.c | 8 ++++----
> net/netfilter/nf_conntrack_proto_tcp.c | 8 ++++----
> 3 files changed, 11 insertions(+), 11 deletions(-)
> diff --git a/net/netfilter/nf_conntrack_pptp.c b/net/netfilter/nf_conntrack_pptp.c
> index 825c3e3..a505263 100644
> --- a/net/netfilter/nf_conntrack_pptp.c
> +++ b/net/netfilter/nf_conntrack_pptp.c
> @@ -92,9 +92,9 @@ const char *const pptp_msg_name[] = {
> EXPORT_SYMBOL(pptp_msg_name);
> #endif
>
> -#define SECS *HZ
> -#define MINS * 60 SECS
> -#define HOURS * 60 MINS
> +#define SECS (*HZ)
> +#define MINS (*60 SECS)
> +#define HOURS (*60 MINS)
This is complete nonsense which would lead to syntax error.
[...]
> diff --git a/net/netfilter/nf_conntrack_proto_sctp.c b/net/netfilter/nf_conntrack_proto_sctp.c
> index 1314d33..387cda5 100644
> --- a/net/netfilter/nf_conntrack_proto_sctp.c
> +++ b/net/netfilter/nf_conntrack_proto_sctp.c
> @@ -44,10 +44,10 @@ static const char *const sctp_conntrack_names[] = {
> "SHUTDOWN_ACK_SENT",
> };
>
> -#define SECS * HZ
> -#define MINS * 60 SECS
> -#define HOURS * 60 MINS
> -#define DAYS * 24 HOURS
> +#define SECS (*HZ)
> +#define MINS (*60 SECS)
> +#define HOURS (*60 MINS)
> +#define DAYS (*24 HOURS)
This as well.
[...]
> diff --git a/net/netfilter/nf_conntrack_proto_tcp.c b/net/netfilter/nf_conntrack_proto_tcp.c
> index 44d1ea3..6a7d6f8 100644
> --- a/net/netfilter/nf_conntrack_proto_tcp.c
> +++ b/net/netfilter/nf_conntrack_proto_tcp.c
> @@ -63,10 +63,10 @@ static const char *const tcp_conntrack_names[] = {
> "SYN_SENT2",
> };
>
> -#define SECS * HZ
> -#define MINS * 60 SECS
> -#define HOURS * 60 MINS
> -#define DAYS * 24 HOURS
> +#define SECS (*HZ)
> +#define MINS (*60 SECS)
> +#define HOURS (*60 MINS)
> +#define DAYS (*24 HOURS)
This too.
WBR, Sergei
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] netfilter: nf_conntrack: fix checkpatch errors
2014-06-03 14:45 [PATCH] netfilter: nf_conntrack: fix checkpatch errors Luca Ellero
2014-06-03 16:58 ` Sergei Shtylyov
@ 2014-06-03 20:48 ` Patrick McHardy
2014-06-04 6:49 ` Luca Ellero
1 sibling, 1 reply; 4+ messages in thread
From: Patrick McHardy @ 2014-06-03 20:48 UTC (permalink / raw)
To: Luca Ellero; +Cc: netfilter, pablo, kadlec, davem, coreteam, netdev
On Tue, Jun 03, 2014 at 04:45:02PM +0200, Luca Ellero wrote:
> Add parenthesis around complex macros
>
> Signed-off-by: Luca Ellero <luca.ellero@brickedbrain.com>
> ---
> net/netfilter/nf_conntrack_pptp.c | 6 +++---
> net/netfilter/nf_conntrack_proto_sctp.c | 8 ++++----
> net/netfilter/nf_conntrack_proto_tcp.c | 8 ++++----
> 3 files changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/net/netfilter/nf_conntrack_pptp.c b/net/netfilter/nf_conntrack_pptp.c
> index 825c3e3..a505263 100644
> --- a/net/netfilter/nf_conntrack_pptp.c
> +++ b/net/netfilter/nf_conntrack_pptp.c
> @@ -92,9 +92,9 @@ const char *const pptp_msg_name[] = {
> EXPORT_SYMBOL(pptp_msg_name);
> #endif
>
> -#define SECS *HZ
> -#define MINS * 60 SECS
> -#define HOURS * 60 MINS
> +#define SECS (*HZ)
> +#define MINS (*60 SECS)
> +#define HOURS (*60 MINS)
Don't send patches that you obviously didn't even compile test.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] netfilter: nf_conntrack: fix checkpatch errors
2014-06-03 20:48 ` Patrick McHardy
@ 2014-06-04 6:49 ` Luca Ellero
0 siblings, 0 replies; 4+ messages in thread
From: Luca Ellero @ 2014-06-04 6:49 UTC (permalink / raw)
To: Patrick McHardy; +Cc: netfilter, pablo, kadlec, davem, coreteam, netdev
Il 03/06/2014 22:48, Patrick McHardy ha scritto:
> On Tue, Jun 03, 2014 at 04:45:02PM +0200, Luca Ellero wrote:
>> Add parenthesis around complex macros
>>
>> Signed-off-by: Luca Ellero <luca.ellero@brickedbrain.com>
>> ---
>> net/netfilter/nf_conntrack_pptp.c | 6 +++---
>> net/netfilter/nf_conntrack_proto_sctp.c | 8 ++++----
>> net/netfilter/nf_conntrack_proto_tcp.c | 8 ++++----
>> 3 files changed, 11 insertions(+), 11 deletions(-)
>>
>> diff --git a/net/netfilter/nf_conntrack_pptp.c b/net/netfilter/nf_conntrack_pptp.c
>> index 825c3e3..a505263 100644
>> --- a/net/netfilter/nf_conntrack_pptp.c
>> +++ b/net/netfilter/nf_conntrack_pptp.c
>> @@ -92,9 +92,9 @@ const char *const pptp_msg_name[] = {
>> EXPORT_SYMBOL(pptp_msg_name);
>> #endif
>>
>> -#define SECS *HZ
>> -#define MINS * 60 SECS
>> -#define HOURS * 60 MINS
>> +#define SECS (*HZ)
>> +#define MINS (*60 SECS)
>> +#define HOURS (*60 MINS)
>
> Don't send patches that you obviously didn't even compile test.
>
beg your pardon, my bad... send it by mistake
Sorry for the noise
Regards
Luca
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-06-04 6:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-03 14:45 [PATCH] netfilter: nf_conntrack: fix checkpatch errors Luca Ellero
2014-06-03 16:58 ` Sergei Shtylyov
2014-06-03 20:48 ` Patrick McHardy
2014-06-04 6:49 ` Luca Ellero
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).