lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 30 Oct 2019 14:39:49 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     vivien.didelot@...il.com
Cc:     linux-kernel@...r.kernel.org, f.fainelli@...il.com, andrew@...n.ch,
        netdev@...r.kernel.org
Subject: Re: [PATCH net-next 1/7] net: dsa: list DSA links in the fabric

From: Vivien Didelot <vivien.didelot@...il.com>
Date: Mon, 28 Oct 2019 15:52:14 -0400

> @@ -122,6 +124,29 @@ static struct dsa_port *dsa_tree_find_port_by_node(struct dsa_switch_tree *dst,
>  	return NULL;
>  }
>  
> +struct dsa_link *dsa_link_touch(struct dsa_port *dp, struct dsa_port *link_dp)
> +{
> +	struct dsa_switch *ds = dp->ds;
> +	struct dsa_switch_tree *dst = ds->dst;
> +	struct dsa_link *dl;

Please fix the reverse christmas tree here, two suggestions:

	struct dsa_switch *ds = dp->ds;
	struct dsa_switch_tree *dst;
	struct dsa_link *dl;

	dst = ds->dst;

Or, alternatively, since the dst variable is used only once, get rid of it
and change:

> +	list_add_tail(&dl->list, &dst->rtable);

to

> +	list_add_tail(&dl->list, &ds->dst->rtable);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ