[PATCH v10 9/9] drm: Remove superfluous print statements in DRM core

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There are a couple of superfluous print statements using the drm_*
macros, which do stuff like printing newlines, print OOM messages
(OOM while allocating memory is already supposed to be noisy), and
printing strings like "Initialised" with no extra info whatsoever.

Thus, remove a couple of these superfluous strings.

Suggested-by: Laurent Pinchart <laurent.pinchart+renesas@xxxxxxxxxxxxxxxx>
Signed-off-by: Siddh Raman Pant <code@xxxxxxxx>
---
 drivers/gpu/drm/drm_client_modeset.c | 3 ---
 drivers/gpu/drm/drm_context.c        | 1 -
 drivers/gpu/drm/drm_crtc_helper.c    | 2 --
 drivers/gpu/drm/drm_drv.c            | 7 -------
 drivers/gpu/drm/drm_file.c           | 2 --
 drivers/gpu/drm/drm_gem.c            | 1 -
 drivers/gpu/drm/drm_hashtab.c        | 1 -
 drivers/gpu/drm/drm_legacy_misc.c    | 1 -
 drivers/gpu/drm/drm_mipi_dbi.c       | 2 --
 drivers/gpu/drm/drm_pci.c            | 6 ------
 drivers/gpu/drm/drm_scatter.c        | 2 --
 11 files changed, 28 deletions(-)

diff --git a/drivers/gpu/drm/drm_client_modeset.c b/drivers/gpu/drm/drm_client_modeset.c
index 4e08ae688b83..e241f9aa5a16 100644
--- a/drivers/gpu/drm/drm_client_modeset.c
+++ b/drivers/gpu/drm/drm_client_modeset.c
@@ -793,8 +793,6 @@ int drm_client_modeset_probe(struct drm_client_dev *client, unsigned int width,
 	int i, ret = 0;
 	bool *enabled;
 
-	drm_dbg_kms(dev, "\n");
-
 	if (!width)
 		width = dev->mode_config.max_width;
 	if (!height)
@@ -824,7 +822,6 @@ int drm_client_modeset_probe(struct drm_client_dev *client, unsigned int width,
 	offsets = kcalloc(connector_count, sizeof(*offsets), GFP_KERNEL);
 	enabled = kcalloc(connector_count, sizeof(bool), GFP_KERNEL);
 	if (!crtcs || !modes || !enabled || !offsets) {
-		drm_err(client->dev, "Memory allocation failed\n");
 		ret = -ENOMEM;
 		goto out;
 	}
diff --git a/drivers/gpu/drm/drm_context.c b/drivers/gpu/drm/drm_context.c
index 8b7b925aee97..c8373294cce0 100644
--- a/drivers/gpu/drm/drm_context.c
+++ b/drivers/gpu/drm/drm_context.c
@@ -382,7 +382,6 @@ int drm_legacy_addctx(struct drm_device *dev, void *data,
 
 	ctx_entry = kmalloc(sizeof(*ctx_entry), GFP_KERNEL);
 	if (!ctx_entry) {
-		drm_dbg_core(dev, "out of memory\n");
 		return -ENOMEM;
 	}
 
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
index 59e7b86eab93..fcf539439880 100644
--- a/drivers/gpu/drm/drm_crtc_helper.c
+++ b/drivers/gpu/drm/drm_crtc_helper.c
@@ -567,8 +567,6 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set,
 	int ret;
 	int i;
 
-	drm_dbg_kms(NULL, "\n");
-
 	BUG_ON(!set);
 	BUG_ON(!set->crtc);
 	BUG_ON(!set->crtc->helper_private);
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index 7adf10cc6e67..86b0df358184 100644
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -166,8 +166,6 @@ static int drm_minor_register(struct drm_device *dev, unsigned int type)
 	unsigned long flags;
 	int ret;
 
-	drm_dbg_core(dev, "\n");
-
 	minor = *drm_minor_get_slot(dev, type);
 	if (!minor)
 		return 0;
@@ -422,8 +420,6 @@ void drm_minor_release(struct drm_minor *minor)
  */
 void drm_put_dev(struct drm_device *dev)
 {
-	drm_dbg_core(NULL, "\n");
-
 	if (!dev) {
 		drm_err(NULL, "cleanup called no dev\n");
 		return;
@@ -1030,8 +1026,6 @@ static int drm_stub_open(struct inode *inode, struct file *filp)
 	struct drm_minor *minor;
 	int err;
 
-	drm_dbg_core(NULL, "\n");
-
 	minor = drm_minor_acquire(iminor(inode));
 	if (IS_ERR(minor))
 		return PTR_ERR(minor);
@@ -1099,7 +1093,6 @@ static int __init drm_core_init(void)
 
 	drm_core_init_complete = true;
 
-	drm_dbg_core(NULL, "Initialized\n");
 	return 0;
 
 error:
diff --git a/drivers/gpu/drm/drm_file.c b/drivers/gpu/drm/drm_file.c
index 883d83bc0e3d..24c78f7ec101 100644
--- a/drivers/gpu/drm/drm_file.c
+++ b/drivers/gpu/drm/drm_file.c
@@ -454,8 +454,6 @@ EXPORT_SYMBOL(drm_open);
 
 void drm_lastclose(struct drm_device * dev)
 {
-	drm_dbg_core(dev, "\n");
-
 	if (dev->driver->lastclose)
 		dev->driver->lastclose(dev);
 	drm_dbg_core(dev, "driver lastclose completed\n");
diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
index 3d88f0483fdf..43326cb4b4f6 100644
--- a/drivers/gpu/drm/drm_gem.c
+++ b/drivers/gpu/drm/drm_gem.c
@@ -101,7 +101,6 @@ drm_gem_init(struct drm_device *dev)
 	vma_offset_manager = drmm_kzalloc(dev, sizeof(*vma_offset_manager),
 					  GFP_KERNEL);
 	if (!vma_offset_manager) {
-		drm_err(dev, "out of memory\n");
 		return -ENOMEM;
 	}
 
diff --git a/drivers/gpu/drm/drm_hashtab.c b/drivers/gpu/drm/drm_hashtab.c
index 357f20d73b43..acc40d3ebb2a 100644
--- a/drivers/gpu/drm/drm_hashtab.c
+++ b/drivers/gpu/drm/drm_hashtab.c
@@ -53,7 +53,6 @@ int drm_ht_create(struct drm_open_hash *ht, unsigned int order)
 	else
 		ht->table = vzalloc(array_size(size, sizeof(*ht->table)));
 	if (!ht->table) {
-		drm_err(NULL, "Out of memory for hash table\n");
 		return -ENOMEM;
 	}
 	return 0;
diff --git a/drivers/gpu/drm/drm_legacy_misc.c b/drivers/gpu/drm/drm_legacy_misc.c
index ad0eef292cb0..69a51f5150e3 100644
--- a/drivers/gpu/drm/drm_legacy_misc.c
+++ b/drivers/gpu/drm/drm_legacy_misc.c
@@ -70,7 +70,6 @@ int drm_legacy_setup(struct drm_device * dev)
 		return ret;
 
 
-	drm_dbg_core(dev, "\n");
 	return 0;
 }
 
diff --git a/drivers/gpu/drm/drm_mipi_dbi.c b/drivers/gpu/drm/drm_mipi_dbi.c
index 793fdd7da1d0..286cfafd022e 100644
--- a/drivers/gpu/drm/drm_mipi_dbi.c
+++ b/drivers/gpu/drm/drm_mipi_dbi.c
@@ -409,8 +409,6 @@ void mipi_dbi_pipe_disable(struct drm_simple_display_pipe *pipe)
 {
 	struct mipi_dbi_dev *dbidev = drm_to_mipi_dbi_dev(pipe->crtc.dev);
 
-	drm_dbg_kms(&dbidev->drm, "\n");
-
 	if (dbidev->backlight)
 		backlight_disable(dbidev->backlight);
 	else
diff --git a/drivers/gpu/drm/drm_pci.c b/drivers/gpu/drm/drm_pci.c
index 485ec407a115..5cdfcd38174e 100644
--- a/drivers/gpu/drm/drm_pci.c
+++ b/drivers/gpu/drm/drm_pci.c
@@ -155,8 +155,6 @@ static int drm_legacy_get_pci_dev(struct pci_dev *pdev,
 	if (IS_ERR(dev))
 		return PTR_ERR(dev);
 
-	drm_dbg_core(dev, "\n");
-
 	ret = pci_enable_device(pdev);
 	if (ret)
 		goto err_free;
@@ -203,8 +201,6 @@ int drm_legacy_pci_init(const struct drm_driver *driver,
 	const struct pci_device_id *pid;
 	int i;
 
-	drm_dbg_core(NULL, "\n");
-
 	if (WARN_ON(!(driver->driver_features & DRIVER_LEGACY)))
 		return -EINVAL;
 
@@ -247,8 +243,6 @@ void drm_legacy_pci_exit(const struct drm_driver *driver,
 {
 	struct drm_device *dev, *tmp;
 
-	drm_dbg_core(NULL, "\n");
-
 	if (!(driver->driver_features & DRIVER_LEGACY)) {
 		WARN_ON(1);
 	} else {
diff --git a/drivers/gpu/drm/drm_scatter.c b/drivers/gpu/drm/drm_scatter.c
index 08b3eb586484..59f755bf6ce9 100644
--- a/drivers/gpu/drm/drm_scatter.c
+++ b/drivers/gpu/drm/drm_scatter.c
@@ -82,8 +82,6 @@ int drm_legacy_sg_alloc(struct drm_device *dev, void *data,
 	struct drm_sg_mem *entry;
 	unsigned long pages, i, j;
 
-	drm_dbg_core(dev, "\n");
-
 	if (!drm_core_check_feature(dev, DRIVER_LEGACY))
 		return -EOPNOTSUPP;
 
-- 
2.39.2






[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux