Thread (1 message) 1 message, 1 author, 2017-12-20

Re: [for-next 07/11] net/mlx5: E-Switch, Create generic header struct to be used by representors

From: Mark Bloch <hidden>
Date: 2017-12-20 19:22:02
Also in: netdev


On 20/12/2017 19:58, David Miller wrote:
From: Saeed Mahameed <saeedm-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
Date: Tue, 19 Dec 2017 12:33:36 -0800
quoted
+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
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help