Bug 10779

Summary: drm_sysfs_suspend uses KERN_ERR in printk
Product: Power Management Reporter: Chris Jones (cmsj)
Component: Hibernation/SuspendAssignee: power-management_other
Status: CLOSED CODE_FIX    
Severity: low CC: jbarnes
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.24-16-generic Subsystem:
Regression: --- Bisected commit-id:
Bug Depends on:    
Bug Blocks: 7216    

Description Chris Jones 2008-05-23 01:03:36 UTC
I am running Ubuntu 8.04's kernel and when I resume from S3 suspend, a single message is displayed on the console about drm_sysfs_suspend, which seems to come from the function:

static int drm_sysfs_suspend(struct device *dev, pm_message_t state)

This doesn't appear to be an error, so presumably this should be KERN_INFO, not KERN_ERR?

(less technical users often express surprise and concern when their laptop comes out of suspend and prints scary messages at them, even if it does actually work fine)
Comment 1 Jesse Barnes 2008-05-23 08:39:15 UTC
You're right, I'm not sure how that snuck in to the final upstream version.  Here's the fix (sending to Linus now).


diff --git a/drivers/char/drm/drm_sysfs.c b/drivers/char/drm/drm_sysfs.c
index 9a32169..af211a0 100644
--- a/drivers/char/drm/drm_sysfs.c
+++ b/drivers/char/drm/drm_sysfs.c
@@ -34,8 +34,6 @@ static int drm_sysfs_suspend(struct device *dev, pm_message_t
        struct drm_minor *drm_minor = to_drm_minor(dev);
        struct drm_device *drm_dev = drm_minor->dev;

-       printk(KERN_ERR "%s\n", __func__);
-
        if (drm_dev->driver->suspend)
                return drm_dev->driver->suspend(drm_dev, state);