Re: [PATCH net-next v6 10/17] net: pse-pd: Add support for PSE PIs
From: Kory Maincent
Date: Thu Mar 28 2024 - 09:45:01 EST
On Thu, 28 Mar 2024 13:24:00 +0100
Andrew Lunn <andrew@xxxxxxx> wrote:
> > +.. 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.
It seems the Documentation copy-pasted from Oleksij mail bring me few weird
characters.
I will fix it.
> > +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.
Ok, I will.
Thanks for your review!
Regards,
--
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com