netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Marek Behún" <kabel@kernel.org>
To: Holger Brunck <holger.brunck@hitachienergy.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Jakub Kicinski <kuba@kernel.org>
Subject: Re: [v5] dsa: mv88e6xxx: make serdes SGMII/Fiber tx amplitude configurable
Date: Wed, 9 Feb 2022 17:08:45 +0100	[thread overview]
Message-ID: <20220209170845.784ba000@dellmb> (raw)
In-Reply-To: <AM0PR0602MB366602FD4AB9AF518A6FBEBCF72E9@AM0PR0602MB3666.eurprd06.prod.outlook.com>

On Wed, 9 Feb 2022 15:04:56 +0000
Holger Brunck <holger.brunck@hitachienergy.com> wrote:

> > > +     if (chip->info->ops->serdes_set_tx_p2p_amplitude) {
> > > +             dp = dsa_to_port(ds, port);
> > > +             if (dp)
> > > +                     phy_handle = of_parse_phandle(dp->dn, "phy-handle", 0);
> > > +
> > > +             if (phy_handle && !of_property_read_u32(phy_handle,
> > > +                                                     "tx-p2p-microvolt",
> > > +                                                     &tx_amp)) {
> > > +                     err = mv88e6352_serdes_set_tx_p2p_amplitude(chip, port,
> > > +                                                                 tx_amp);
> > > +                     if (err) {
> > > +                             of_node_put(phy_handle);
> > > +                             return err;
> > > +                     }  
> > 
> > You could move this test
> >   
> > > +             }
> > > +             if (phy_handle)
> > > +                     of_node_put(phy_handle);  
> > 
> > to here, since you need to put the phy_handle anyway.
> >   
> 
> ok. I think I will also rename the ...set_tx_p2p_amplitude to ...set_tx_p2p to
> shorten the function names. Makes it easier to read.

Please don't drop "amplitude". If anything, drop the "p2p".

Marek

      reply	other threads:[~2022-02-09 16:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-09  9:54 [v5] dsa: mv88e6xxx: make serdes SGMII/Fiber tx amplitude configurable Holger Brunck
2022-02-09 12:36 ` Marek Behún
2022-02-09 13:23   ` Holger Brunck
2022-02-09 13:37 ` Andrew Lunn
2022-02-09 15:04   ` Holger Brunck
2022-02-09 16:08     ` Marek Behún [this message]

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=20220209170845.784ba000@dellmb \
    --to=kabel@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=holger.brunck@hitachienergy.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    /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).