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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 16 Aug 2017 11:08:40 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     'David Miller' <davem@...emloft.net>,
        "subashab@...eaurora.org" <subashab@...eaurora.org>
CC:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "fengguang.wu@...el.com" <fengguang.wu@...el.com>,
        "dcbw@...hat.com" <dcbw@...hat.com>,
        "jiri@...nulli.us" <jiri@...nulli.us>,
        "stephen@...workplumber.org" <stephen@...workplumber.org>
Subject: RE: [PATCH net-next 3/3 v4] drivers: net: ethernet: qualcomm:
 rmnet: Initial implementation

From: David Miller
> Sent: 16 August 2017 05:24
> From: Subash Abhinov Kasiviswanathan <subashab@...eaurora.org>
> Date: Tue, 15 Aug 2017 22:15:53 -0600
> 
> > +static int rmnet_unregister_real_device(struct net_device *dev)
> > +{
> > +	int config_id = RMNET_LOCAL_LOGICAL_ENDPOINT;
> > +	struct rmnet_logical_ep_conf_s *epconfig_l;
> > +	struct rmnet_phys_ep_conf_s *config;
> > +
> > +	ASSERT_RTNL();
> > +
> > +	netdev_info(dev, "Removing device %s\n", dev->name);
> > +
> > +	if (!rmnet_is_real_dev_registered(dev))
> > +		return -EINVAL;
> > +
> > +	for (; config_id < RMNET_MAX_LOGICAL_EP; config_id++) {
> 
> This loop is so much harder to understand because you initialize
> the loop index several lines above the for() statement.  Just
> initialize it here at the beginning of the for() loop and deal
> with the fact that this will have to therefore be a multi-line
> for() statement the best you can.
...

One way to split the multi-line for() is to put the initialiser
on the immediately preceding line:
	config_id = RMNET_LOCAL_LOGICAL_ENDPOINT;
	for (; config_id < RMNET_MAX_LOGICAL_EP; config_id++) {

	David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ