Make the drm attach messages a lot prettier.
authoroga <oga@openbsd.org>
Sat, 2 Aug 2008 16:03:05 +0000 (16:03 +0000)
committeroga <oga@openbsd.org>
Sat, 2 Aug 2008 16:03:05 +0000 (16:03 +0000)
the DRM_{INFO,ERROR,DEBUG} printf macros still need some __VA_ARGS__ love.

reyk@ and marco@ liked this, prompted by deraadt.

sys/dev/pci/drm/drm_agpsupport.c
sys/dev/pci/drm/drm_drv.c

index cada9cf..2289986 100644 (file)
@@ -397,9 +397,6 @@ drm_agp_init(void)
 #endif
                head->base = head->info.ai_aperture_base;
                TAILQ_INIT(&head->memory);
-               DRM_INFO("AGP at 0x%08lx %dMB\n",
-                   (long)head->info.ai_aperture_base,
-                   (int)(head->info.ai_aperture_size >> 20));
        }
        return head;
 }
index 13f7c62..994595b 100644 (file)
@@ -177,8 +177,7 @@ drm_attach(struct device *parent, struct device *kdev,
        dev->id_entry = id_entry;
        dev->driver.id_entry = id_entry;
 
-       printf("\n");
-       DRM_INFO("%s (unit %d)\n", id_entry->name, dev->unit);
+       printf(": %s(%d)", id_entry->name, dev->unit);
        drm_load(dev);
 }
 
@@ -405,8 +404,7 @@ drm_load(struct drm_device *dev)
                DRM_ERROR("Cannot allocate memory for context bitmap.\n");
                goto error;
        }
-       DRM_INFO("Initialized %s %d.%d.%d %s\n",
-           dev->driver.name,
+       printf(", %d.%d.%d %s\n",
            dev->driver.major,
            dev->driver.minor,
            dev->driver.patchlevel,