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:   Wed, 20 Dec 2017 21:22:02 +0200
From:   Mark Bloch <markb@...lanox.com>
To:     David Miller <davem@...emloft.net>, saeedm@...lanox.com
Cc:     dledford@...hat.com, netdev@...r.kernel.org,
        linux-rdma@...r.kernel.org, leonro@...lanox.com
Subject: Re: [for-next 07/11] net/mlx5: E-Switch, Create generic header struct
 to be used by representors



On 20/12/2017 19:58, David Miller wrote:
> From: Saeed Mahameed <saeedm@...lanox.com>
> Date: Tue, 19 Dec 2017 12:33:36 -0800
> 
>> +static int esw_offloads_load_reps(struct mlx5_eswitch *esw, int nvports)
>> +{
>> +	u8 rep_type = 0;
>> +	int err;
>> +
>> +	while (rep_type < NUM_REP_TYPES) {
>> +		err = esw_offloads_load_reps_type(esw, nvports,
>> +						  rep_type);
>> +		if (err)
>> +			goto err_reps;
>> +		rep_type++;
>> +	}
> 
> Please, don't obfuscate what is a normal for() loop:
> 
> 	for (rep_type = 0; rep_type < NUM_REP_TYPES; rep_type
In case of an error I'm using a while loop, wanted to use a
while loop on the good path as well, will change to a for loop.

> 
> Thanks.

> 

Thanks!
Mark

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ