Skip to contentSkip to conversation

question about _nouveau_i2c_fini()

PATCH Dan Carpenter 1 participant 1 message Dec 6, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

Hi Ben,

What's the point of the comma operator here?

	 if ((mask = (1 << impl->aux) - 1), impl->aux_stat) {

Is this supposed to be a while loop or something? I don't get it. Why not pull it out into a separate statement?

drivers/gpu/drm/nouveau/core/subdev/i2c/base.c +2 -1
index 0dc605d..20506f8 100644
@@ -414,7 +414,8 @@ _nouveau_i2c_fini(struct nouveau_object *object, bool suspend)
 			goto fail;
 	}
 
-	if ((mask = (1 << impl->aux) - 1), impl->aux_stat) {
+	mask = (1 << impl->aux) - 1;
+	if (impl->aux_stat) {
 		impl->aux_mask(i2c, NVKM_I2C_ANY, mask, 0);
 		impl->aux_stat(i2c, &mask, &mask, &mask, &mask);
 	}

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel