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


Groups > linux.kernel > #1307876

Re: [ovs-dev] [PATCH] Openvswitch: datapath.c: Fixed coding style warnings.

From pravin shelar <pshelar@ovn.org>
Newsgroups linux.kernel
Subject Re: [ovs-dev] [PATCH] Openvswitch: datapath.c: Fixed coding style warnings.
Date 2016-01-12 23:20 +0100
Message-ID <qQfse-7eN-21@gated-at.bofh.it> (permalink)
References <qQf8S-6R1-3@gated-at.bofh.it> <qQf8U-6R1-47@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Jan 12, 2016 at 1:55 PM, Janusz Wolak <januszvdm@awokados.com.pl> wrote:
> Removed: block comments trailing without separate line,
> missing blanks after decarations, comparasion to NULL, assignment in if
> condition, not necessary spaces after a casts, multiple assignments, line
> over 80 characters, alignment not matched to open parenthesis, kmalloc with
> multiplying instead kmalloc_array.
>
>
> Signed-off-by: Janusz Wolak <januszvdm@awokados.com.pl>
> ---
>  net/openvswitch/datapath.c | 75 ++++++++++++++++++++++++++--------------------
>  1 file changed, 42 insertions(+), 33 deletions(-)
>
> diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
> index 91a8b00..12ff8c2 100644
> --- a/net/openvswitch/datapath.c
> +++ b/net/openvswitch/datapath.c

...

> @@ -455,8 +457,8 @@ static int queue_userspace_packet(struct datapath *dp, struct sk_buff *skb,
>         }
>
>         /* Complete checksum if needed */
> -       if (skb->ip_summed == CHECKSUM_PARTIAL &&
> -           (err = skb_checksum_help(skb)))
> +       err = skb_checksum_help(skb);
> +       if (skb->ip_summed == CHECKSUM_PARTIAL && err)
>                 goto out;
>
skb checksum help can be expensive in some cases, so it should be
moved inside the if condition block.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] Openvswitch: actions.c: Removed line over 80 characters and not necessary braces. Janusz Wolak <januszvdm@awokados.com.pl> - 2016-01-12 23:00 +0100
  [PATCH] Openvswitch: datapath.c: Fixed coding style warnings. Janusz Wolak <januszvdm@awokados.com.pl> - 2016-01-12 23:00 +0100
    Re: [ovs-dev] [PATCH] Openvswitch: datapath.c: Fixed coding style warnings. pravin shelar <pshelar@ovn.org> - 2016-01-12 23:20 +0100
  [PATCH] Openvswitch: conntrack.c: Removed multiple blank lines. Janusz Wolak <januszvdm@awokados.com.pl> - 2016-01-12 23:00 +0100
  Re: [PATCH] Openvswitch: actions.c: Removed line over 80  characters and not necessary braces. David Miller <davem@davemloft.net> - 2016-01-12 23:20 +0100

csiph-web