netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Borkmann <dborkman@redhat.com>
To: Yang Yingliang <yangyingliang@huawei.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org,
	eric.dumazet@gmail.com, jhs@mojatatu.com,
	stephen@networkplumber.org
Subject: Re: [PATCH net-next v2 2/3] net_sched: fix some checkpatch errors
Date: Thu, 07 Nov 2013 09:37:52 +0100	[thread overview]
Message-ID: <527B5160.5070700@redhat.com> (raw)
In-Reply-To: <1383790412-41944-3-git-send-email-yangyingliang@huawei.com>

On 11/07/2013 03:13 AM, Yang Yingliang wrote:
> There are some checkpatch errors, fix them.
>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> Suggested-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
>   net/sched/act_api.c     |  5 +++--
>   net/sched/cls_bpf.c     |  2 +-
>   net/sched/cls_u32.c     |  2 +-
>   net/sched/sch_cbq.c     |  3 ++-
>   net/sched/sch_generic.c |  4 ++--
>   net/sched/sch_htb.c     | 13 +++++++------
>   net/sched/sch_netem.c   |  2 +-
>   net/sched/sch_sfq.c     | 10 ++++++----
>   8 files changed, 23 insertions(+), 18 deletions(-)
>
> diff --git a/net/sched/act_api.c b/net/sched/act_api.c
> index fd70728..d92a90e9 100644
> --- a/net/sched/act_api.c
> +++ b/net/sched/act_api.c
> @@ -191,7 +191,8 @@ u32 tcf_hash_new_index(u32 *idx_gen, struct tcf_hashinfo *hinfo)
>   			val = 1;
>   	} while (tcf_hash_lookup(val, hinfo));
>
> -	return (*idx_gen = val);
> +	*idx_gen = val;
> +	return *idx_gen;
>   }
>   EXPORT_SYMBOL(tcf_hash_new_index);
>
> @@ -263,7 +264,7 @@ void tcf_hash_insert(struct tcf_common *p, struct tcf_hashinfo *hinfo)
>   }
>   EXPORT_SYMBOL(tcf_hash_insert);
>
> -static struct tc_action_ops *act_base = NULL;
> +static struct tc_action_ops *act_base;

 From a readability point of view, I think this makes it worse, also the other places
where you change globals vars like that.

>   static DEFINE_RWLOCK(act_mod_lock);
>
>   int tcf_register_action(struct tc_action_ops *act)
> diff --git a/net/sched/cls_bpf.c b/net/sched/cls_bpf.c
> index 1002a82..d7c72be 100644
> --- a/net/sched/cls_bpf.c
> +++ b/net/sched/cls_bpf.c
> @@ -323,7 +323,7 @@ static int cls_bpf_dump(struct tcf_proto *tp, unsigned long fh,
>   	if (nla == NULL)
[...]

Also, when you submit v3, I think it would be good if you separate your patch into two
sets: patch1 on its own, and then patch2 and patch3 as an own set as the last two have
not much in common from what's in the cover letter.

  reply	other threads:[~2013-11-07  8:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-07  2:13 [PATCH net-next v2 0/3] net_sched: make tbf support 64bit rates Yang Yingliang
2013-11-07  2:13 ` [PATCH net-next v2 1/3] net_sched: tbf: support of " Yang Yingliang
2013-11-07 14:25   ` Sergei Shtylyov
2013-11-08  1:40     ` Yang Yingliang
2013-11-07  2:13 ` [PATCH net-next v2 2/3] net_sched: fix some checkpatch errors Yang Yingliang
2013-11-07  8:37   ` Daniel Borkmann [this message]
2013-11-08 11:04     ` Bjørn Mork
2013-11-07 14:33   ` Sergei Shtylyov
2013-11-08  1:51     ` Yang Yingliang
2013-11-07  2:13 ` [PATCH net-next v2 3/3] net_sched: Use pr_debug replace printk(KERN_DEBUG ...) Yang Yingliang
2013-11-07  8:30   ` Daniel Borkmann
2013-11-07  8:43     ` Yang Yingliang
2013-11-07 14:43   ` Sergei Shtylyov

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=527B5160.5070700@redhat.com \
    --to=dborkman@redhat.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=jhs@mojatatu.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    --cc=yangyingliang@huawei.com \
    /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).