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: <AE90C24D6B3A694183C094C60CF0A2F6026B70D4@saturn3.aculab.com>
Date:	Mon, 3 Dec 2012 10:41:28 -0000
From:	"David Laight" <David.Laight@...LAB.COM>
To:	"Steve Glendinning" <steve.glendinning@...well.net>,
	<netdev@...r.kernel.org>
Subject: RE: [PATCH 5/5] smsc95xx: expand check_ macros

> -		check_warn_return(ret, "Error reading MII_ACCESS\n");
> +		if (ret < 0) {
> +			netdev_warn(dev->net, "Error reading MII_ACCESS\n");
> +			return ret;
> +		}
> +

It might be worth defining something like:

#define check_warn(dev, ret, errmsg) \
	(ret >= 0 ? 0 : (netdev_warn(dev->net, errmsg), ret))

so the above code can be:
	if (check_warn(dev, ret, "Error reading MII_ACCESS\n"))
		return ret;

	David



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ