* question about _nouveau_i2c_fini()
@ 2014-12-06 20:31 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2014-12-06 20:31 UTC (permalink / raw)
To: Ben Skeggs; +Cc: dri-devel
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);
}
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-12-06 20:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-06 20:31 question about _nouveau_i2c_fini() Dan Carpenter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.