netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Luca Ellero <luca.ellero@brickedbrain.com>, netfilter@vger.kernel.org
Cc: pablo@netfilter.org, kaber@trash.net, kadlec@blackhole.kfki.hu,
	davem@davemloft.net, coreteam@netfilter.org,
	netdev@vger.kernel.org
Subject: Re: [PATCH] netfilter: nf_conntrack: fix checkpatch errors
Date: Tue, 03 Jun 2014 20:58:09 +0400	[thread overview]
Message-ID: <538DFEA1.1030309@cogentembedded.com> (raw)
In-Reply-To: <1401806702-3251-1-git-send-email-luca.ellero@brickedbrain.com>

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

  reply	other threads:[~2014-06-03 16:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-03 14:45 [PATCH] netfilter: nf_conntrack: fix checkpatch errors Luca Ellero
2014-06-03 16:58 ` Sergei Shtylyov [this message]
2014-06-03 20:48 ` Patrick McHardy
2014-06-04  6:49   ` Luca Ellero

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=538DFEA1.1030309@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=coreteam@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=kaber@trash.net \
    --cc=kadlec@blackhole.kfki.hu \
    --cc=luca.ellero@brickedbrain.com \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter@vger.kernel.org \
    --cc=pablo@netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).