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]
Message-ID: <AM0PR0602MB366602FD4AB9AF518A6FBEBCF72E9@AM0PR0602MB3666.eurprd06.prod.outlook.com>
Date:   Wed, 9 Feb 2022 15:04:56 +0000
From:   Holger Brunck <holger.brunck@...achienergy.com>
To:     Andrew Lunn <andrew@...n.ch>
CC:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Jakub Kicinski <kuba@...nel.org>,
        Marek BehĂșn <kabel@...nel.org>
Subject: RE: [v5] dsa: mv88e6xxx: make serdes SGMII/Fiber tx amplitude
 configurable

> > +     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.

Best regards
Holger

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ