question about _nouveau_i2c_fini()
Dan Carpenter
dan.carpenter at oracle.com
Sat Dec 6 12:31:34 PST 2014
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?
diff --git a/drivers/gpu/drm/nouveau/core/subdev/i2c/base.c b/drivers/gpu/drm/nouveau/core/subdev/i2c/base.c
index 0dc605d..20506f8 100644
--- a/drivers/gpu/drm/nouveau/core/subdev/i2c/base.c
+++ b/drivers/gpu/drm/nouveau/core/subdev/i2c/base.c
@@ -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);
}
More information about the dri-devel
mailing list