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:   Thu, 27 Apr 2023 14:25:03 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Hayes Wang <hayeswang@...ltek.com>
Cc:     kuba@...nel.org, davem@...emloft.net, netdev@...r.kernel.org,
        nic_swsd@...ltek.com, linux-kernel@...r.kernel.org,
        linux-usb@...r.kernel.org
Subject: Re: [PATCH net v2 2/3] r8152: fix the poor throughput for 2.5G
 devices

> @@ -7554,6 +7558,11 @@ static void r8156_hw_phy_cfg(struct r8152 *tp)
>  				      ((swap_a & 0x1f) << 8) |
>  				      ((swap_a >> 8) & 0x1f));
>  		}
> +
> +		/*  set intr_en[3] */
> +		data = ocp_reg_read(tp, OCP_INTR_EN);
> +		data |= INTR_SPEED_FORCE;

Which is more meaningful, set intr_en[3], or data |= INTR_SPEED_FORCE
I would say the second. The code is now pretty readable, it says
what it is doing. So if you want to add a comment, you really should
be commenting on why, not what.

   Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ