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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f3bafb50-406b-444a-8411-5ddae8d84c31@lunn.ch>
Date: Thu, 28 Mar 2024 13:24:00 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Kory Maincent <kory.maincent@...tlin.com>
Cc: "David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Jonathan Corbet <corbet@....net>,
	Luis Chamberlain <mcgrof@...nel.org>,
	Russ Weight <russ.weight@...ux.dev>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	"Rafael J. Wysocki" <rafael@...nel.org>,
	Rob Herring <robh+dt@...nel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Oleksij Rempel <o.rempel@...gutronix.de>,
	Mark Brown <broonie@...nel.org>,
	Frank Rowand <frowand.list@...il.com>,
	Heiner Kallweit <hkallweit1@...il.com>,
	Russell King <linux@...linux.org.uk>,
	Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-doc@...r.kernel.org, devicetree@...r.kernel.org,
	Dent Project <dentproject@...uxfoundation.org>
Subject: Re: [PATCH net-next v6 10/17] net: pse-pd: Add support for PSE PIs

> +.. code-block::
> +
> +         +-------------+
> +         |    PSE PI   |
> + 8  -----+                             +-------------+
> + 7  -----+                    Rail 1   |
> + 6  -----+------+----------------------+
> + 5  -----+      |                      |
> + 4  -----+     /              Rail 2   |  PSE 1
> + 3  -----+----?          +-------------+
> + 2  -----+----+---------?              |
> + 1  -----+---?                         +-------------+
> +         |
> +         +-------------+

Is ? a standard markup character? I don't remember seeing it used like
this before.

Maybe offset the connection for pins 1 and 2 from that of 3. I mean:

> + 4  -----+     /              Rail 2   |  PSE 1
> + 3  -----+----?          +-------------+
> + 2  -----+--------+-----?              |
> + 1  -----+-------?                     +-------------+

You version is a little ambiguous, pins 1, 2 & 3 could be
interconnected at the +.  The text does however make it clear they are
not, but i don't see any harm in making the diagram clearer.

> +static int of_load_single_pse_pi_pairset(struct device_node *node,
> +					 struct pse_pi *pi,
> +					 int pairset_num)
> +{
> +	struct device_node *pairset_np;
> +	const char *name;
> +	int ret;
> +
> +	ret = of_property_read_string_index(node, "pairset-names",
> +					    pairset_num, &name);
> +	if (ret)
> +		return ret;
> +
> +	if (!strcmp(name, "alternative-a")) {
> +		pi->pairset[pairset_num].pinout = ALTERNATIVE_A;
> +	} else if (!strcmp(name, "alternative-b")) {
> +		pi->pairset[pairset_num].pinout = ALTERNATIVE_B;
> +	} else {
> +		pr_err("pse: wrong pairset-names value %s\n", name);
> +		return -EINVAL;

Maybe include the node path in the error message? For a 24 port
switch, it will help find a typo in one of the ports. I would do this
for all error messages in this code.

Please add my Reviewed-by on the next version.

       Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ