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: <20180201.100918.842039702040652176.davem@davemloft.net>
Date:   Thu, 01 Feb 2018 10:09:18 -0500 (EST)
From:   David Miller <davem@...emloft.net>
To:     andrew@...n.ch
Cc:     Joao.Pinto@...opsys.com, Jose.Abreu@...opsys.com,
        netdev@...r.kernel.org, peppe.cavallaro@...com,
        alexandre.torgue@...com
Subject: Re: [PATCH net-next 2/2] net: stmmac: Add support for DWMAC5 and
 implement Safety Features

From: Andrew Lunn <andrew@...n.ch>
Date: Thu, 1 Feb 2018 16:02:09 +0100

>> +static void dwmac5_log_error(struct net_device *ndev, u32 value, bool corr,
>> +		const char *module_name, const char **errors_str) {
>> +	unsigned long loc, mask;
>> +
>> +	mask = value;
>> +	for_each_set_bit(loc, &mask, 32) {
>> +		netdev_err(ndev, "Found %s error in %s: '%s'\n", corr ?
>> +				"correctable" : "uncorrectable", module_name,
>> +				errors_str[loc]);
>> +	}
>> +}
> 
> How about also adding ethtool -S stats. You have a text string, so all
> you need to add is a counter. And i expect statistics are looked at
> more than dmesg output.

I agree.  Perhaps for extremely catastrophic errors (those which
require a complete chip reset, for example), statistics are really the
way to go.

Also, all of these functions are not style properly.  The openning
curly braces of a function belong on a separate line of their own, not
at the end of the arguments.

The braces for structure assignment blocks have a similar problem,
the final closing brace and semicolon should be on a line by itself.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ