diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2011-04-07 15:30:17 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2011-04-07 15:30:17 +0000 |
commit | 470f59fa3f11b7317fc5907cfef6043f2104bcc6 (patch) | |
tree | 50aedec19587d2927b807e6719da0022055c56df /sys/dev/pci/drm | |
parent | 1d2ed5cc87538f3c2a6389c586a609a8b73610b7 (diff) |
Do not use NULL in integer comparisons. No functional change.
ok matthew@ tedu@, also eyeballed by at least krw@ oga@ kettenis@ jsg@
Diffstat (limited to 'sys/dev/pci/drm')
-rw-r--r-- | sys/dev/pci/drm/drm_drv.c | 2 | ||||
-rw-r--r-- | sys/dev/pci/drm/i915_drv.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/pci/drm/drm_drv.c b/sys/dev/pci/drm/drm_drv.c index c7977adade7..6a8b7d19c64 100644 --- a/sys/dev/pci/drm/drm_drv.c +++ b/sys/dev/pci/drm/drm_drv.c @@ -179,7 +179,7 @@ drm_attach(struct device *parent, struct device *self, void *aux) * conflict with it. */ dev->handle_ext = extent_create("drmext", 1024*1024*1024, LONG_MAX, - M_DRM, NULL, NULL, EX_NOWAIT | EX_NOCOALESCE); + M_DRM, NULL, 0, EX_NOWAIT | EX_NOCOALESCE); if (dev->handle_ext == NULL) { DRM_ERROR("Failed to initialise handle extent\n"); goto error; diff --git a/sys/dev/pci/drm/i915_drv.c b/sys/dev/pci/drm/i915_drv.c index 29ccafed6d8..8eb0cdf200f 100644 --- a/sys/dev/pci/drm/i915_drv.c +++ b/sys/dev/pci/drm/i915_drv.c @@ -528,7 +528,7 @@ inteldrm_detach(struct device *self, int flags) dev_priv->hw_status_page = NULL; } - if (IS_I9XX(dev_priv) && dev_priv->ifp.i9xx.bsh != NULL) { + if (IS_I9XX(dev_priv) && dev_priv->ifp.i9xx.bsh != 0) { bus_space_unmap(dev_priv->ifp.i9xx.bst, dev_priv->ifp.i9xx.bsh, PAGE_SIZE); } else if (dev_priv->flags & (CHIP_I830 | CHIP_I845G | CHIP_I85X | @@ -944,7 +944,7 @@ i915_alloc_ifp(struct inteldrm_softc *dev_priv, struct pci_attach_args *bpa) return; nope: - dev_priv->ifp.i9xx.bsh = NULL; + dev_priv->ifp.i9xx.bsh = 0; printf(": no ifp "); } @@ -979,7 +979,7 @@ i965_alloc_ifp(struct inteldrm_softc *dev_priv, struct pci_attach_args *bpa) return; nope: - dev_priv->ifp.i9xx.bsh = NULL; + dev_priv->ifp.i9xx.bsh = 0; printf(": no ifp "); } @@ -991,7 +991,7 @@ inteldrm_chipset_flush(struct inteldrm_softc *dev_priv) * The write will return when it is done. */ if (IS_I9XX(dev_priv)) { - if (dev_priv->ifp.i9xx.bsh != NULL) + if (dev_priv->ifp.i9xx.bsh != 0) bus_space_write_4(dev_priv->ifp.i9xx.bst, dev_priv->ifp.i9xx.bsh, 0, 1); } else { |