static void intel_init_display(struct drm_device *dev)
{
struct drm_i915_private *dev_priv = dev->dev_private;
/* Returns the core display clock speed */
if (IS_I945G(dev) || (IS_G33(dev) && ! IS_PINEVIEW_M(dev)))
dev_priv->display.get_display_clock_speed =
i945_get_display_clock_speed;
else if (IS_I865G(dev))
dev_priv->display.get_display_clock_speed =
i865_get_display_clock_speed;
else if (IS_I85X(dev))
dev_priv->display.get_display_clock_speed =
i855_get_display_clock_speed;
else /* 852, 830 */
dev_priv->display.get_display_clock_speed =
i830_get_display_clock_speed;
if (something) {
printf("some\n");
} else if (IS_I865G(dev)) {
printf("testin\n");
}
}
I want to remove the IS_865G bits.
This does not quite work.
@@
identifier f;
type T;
@@
T f(...){<...
-if (IS_I865G(...)) {...}
...>}
@@
identifier f;
type T;
statement S;
@@
T f(...){<...
-if (IS_I865G(...)) S;
...>}
@@ -18,7 +18,5 @@ static void intel_init_display(struct dr
i830_get_display_clock_speed;
if (something) {
printf("some\n");
- } else if (IS_I865G(dev)) {
- printf("testin\n");
- }
+ } else {}
}
It misses the first one and I'm not sure I understand the addition of
the else {}?
thanks
ron
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)