drm/tegra: Replace dev_* with DRM_DEV_*
PATCH v2 1/1 drm/tegra: Replace dev_* with DRM_DEV_*
Replace all occurences of dev_info/err/dbg with DRM_DEV_INFO/ ERROR/DEBUG as we have DRM_DEV_* variants of drm print macros Done using following coccinelle semantic patch
@r@
@@
(
-dev_info
+DRM_DEV_INFO
|
-dev_err
+DRM_DEV_ERROR
|
-dev_dbg
+DRM_DEV_DEBUG
)
---
Changes in v2:
-Break line over 80 characters
-Changes in comments not required
drivers/gpu/drm/tegra/dc.c | 53 +++++++----- drivers/gpu/drm/tegra/dpaux.c | 24 +++--- drivers/gpu/drm/tegra/dsi.c | 68 ++++++++------- drivers/gpu/drm/tegra/falcon.c | 16 ++-- drivers/gpu/drm/tegra/fb.c | 22 +++-- drivers/gpu/drm/tegra/gem.c | 8 +- drivers/gpu/drm/tegra/gr2d.c | 10 ++- drivers/gpu/drm/tegra/gr3d.c | 20 +++-- drivers/gpu/drm/tegra/hdmi.c | 66 +++++++++------ drivers/gpu/drm/tegra/output.c | 8 +- drivers/gpu/drm/tegra/rgb.c | 12 +-- drivers/gpu/drm/tegra/sor.c | 184 +++++++++++++++++++++++++---------------- drivers/gpu/drm/tegra/vic.c | 15 ++-- 13 files changed, 304 insertions(+), 202 deletions(-)
drivers/gpu/drm/tegra/dc.c +32 -21
@@ -1137,7 +1137,7 @@ static void tegra_dc_commit_state(struct tegra_dc *dc, err =clk_set_parent (dc->clk, state->clk);if (err <0 ) -dev_err (dc->dev,"failed to set parent clock: %d\n" , err); +DRM_DEV_ERROR (dc->dev,"failed to set parent clock: %d\n" , err);/* * Outputs may not want to change the parent clock rate. This is only
@@ -1150,7 +1150,7 @@ static void tegra_dc_commit_state(struct tegra_dc *dc,if (state->pclk >0 ) { err =clk_set_rate (state->clk, state->pclk);if (err <0 ) -dev_err (dc->dev, +DRM_DEV_ERROR (dc->dev,"failed to set clock rate to %lu Hz\n" , state->pclk); }
@@ -1195,7 +1195,7 @@ static int tegra_dc_wait_idle(struct tegra_dc *dc, unsigned long timeout)usleep_range (1000 ,2000 ); } -dev_dbg (dc->dev,"timeout waiting for DC to become idle\n" ); +DRM_DEV_DEBUG (dc->dev,"timeout waiting for DC to become idle\n" );return -ETIMEDOUT ; }
@@ -1763,7 +1763,8 @@ static int tegra_dc_init(struct host1x_client *client)if (tegra->domain) { err =iommu_attach_device (tegra->domain, dc->dev);if (err <0 ) { -dev_err (dc->dev,"failed to attach to domain: %d\n" , +DRM_DEV_ERROR (dc->dev, +"failed to attach to domain: %d\n" , err);return err; }
@@ -1801,7 +1802,8 @@ static int tegra_dc_init(struct host1x_client *client) err =tegra_dc_rgb_init (drm, dc);if (err <0 && err != -ENODEV ) { -dev_err (dc->dev,"failed to initialize RGB output: %d\n" , err); +DRM_DEV_ERROR (dc->dev, +"failed to initialize RGB output: %d\n" , err); goto cleanup; }
@@ -1812,13 +1814,15 @@ static int tegra_dc_init(struct host1x_client *client)if (IS_ENABLED (CONFIG_DEBUG_FS )) { err =tegra_dc_debugfs_init (dc, drm->primary);if (err <0 ) -dev_err (dc->dev,"debugfs setup failed: %d\n" , err); +DRM_DEV_ERROR (dc->dev, +"debugfs setup failed: %d\n" , err); } err =devm_request_irq (dc->dev, dc->irq, tegra_dc_irq,0 ,dev_name (dc->dev), dc);if (err <0 ) { -dev_err (dc->dev,"failed to request IRQ#%u: %d\n" , dc->irq, +DRM_DEV_ERROR (dc->dev, +"failed to request IRQ#%u: %d\n" , dc->irq, err); goto cleanup; }
@@ -1850,12 +1854,14 @@ static int tegra_dc_exit(struct host1x_client *client)if (IS_ENABLED (CONFIG_DEBUG_FS )) { err =tegra_dc_debugfs_exit (dc);if (err <0 ) -dev_err (dc->dev,"debugfs cleanup failed: %d\n" , err); +DRM_DEV_ERROR (dc->dev, +"debugfs cleanup failed: %d\n" , err); } err =tegra_dc_rgb_exit (dc);if (err) { -dev_err (dc->dev,"failed to shutdown RGB output: %d\n" , err); +DRM_DEV_ERROR (dc->dev, +"failed to shutdown RGB output: %d\n" , err);return err; }
@@ -1954,7 +1960,7 @@ static int tegra_dc_parse_dt(struct tegra_dc *dc) err =of_property_read_u32 (dc->dev->of_node,"nvidia,head" , &value);if (err <0 ) { -dev_err (dc->dev,"missing \"nvidia,head\" property\n" ); +DRM_DEV_ERROR (dc->dev,"missing \"nvidia,head\" property\n" );/* * If the nvidia,head property isn't present, try to find the
@@ -2009,13 +2015,13 @@ static int tegra_dc_probe(struct platform_device *pdev) dc->clk =devm_clk_get (&pdev->dev,NULL );if (IS_ERR (dc->clk)) { -dev_err (&pdev->dev,"failed to get clock\n" ); +DRM_DEV_ERROR (&pdev->dev,"failed to get clock\n" );return PTR_ERR (dc->clk); } dc->rst =devm_reset_control_get (&pdev->dev,"dc" );if (IS_ERR (dc->rst)) { -dev_err (&pdev->dev,"failed to get reset\n" ); +DRM_DEV_ERROR (&pdev->dev,"failed to get reset\n" );return PTR_ERR (dc->rst); }
@@ -2038,13 +2044,14 @@ static int tegra_dc_probe(struct platform_device *pdev) dc->irq =platform_get_irq (pdev,0 );if (dc->irq <0 ) { -dev_err (&pdev->dev,"failed to get IRQ\n" ); +DRM_DEV_ERROR (&pdev->dev,"failed to get IRQ\n" );return -ENXIO ; } err =tegra_dc_rgb_probe (dc);if (err <0 && err != -ENODEV ) { -dev_err (&pdev->dev,"failed to probe RGB output: %d\n" , err); +DRM_DEV_ERROR (&pdev->dev, +"failed to probe RGB output: %d\n" , err);return err; }
@@ -2057,7 +2064,8 @@ static int tegra_dc_probe(struct platform_device *pdev) err =host1x_client_register (&dc->client);if (err <0 ) { -dev_err (&pdev->dev,"failed to register host1x client: %d\n" , +DRM_DEV_ERROR (&pdev->dev, +"failed to register host1x client: %d\n" , err);return err; }
@@ -2072,14 +2080,16 @@ static int tegra_dc_remove(struct platform_device *pdev) err =host1x_client_unregister (&dc->client);if (err <0 ) { -dev_err (&pdev->dev,"failed to unregister host1x client: %d\n" , +DRM_DEV_ERROR (&pdev->dev, +"failed to unregister host1x client: %d\n" , err);return err; } err =tegra_dc_rgb_remove (dc);if (err <0 ) { -dev_err (&pdev->dev,"failed to remove RGB output: %d\n" , err); +DRM_DEV_ERROR (&pdev->dev, +"failed to remove RGB output: %d\n" , err);return err; }
@@ -2097,7 +2107,7 @@ static int tegra_dc_suspend(struct device *dev)if (!dc->soc->broken_reset) { err =reset_control_assert (dc->rst);if (err <0 ) { -dev_err (dev,"failed to assert reset: %d\n" , err); +DRM_DEV_ERROR (dev,"failed to assert reset: %d\n" , err);return err; } }
@@ -2119,20 +2129,21 @@ static int tegra_dc_resume(struct device *dev) err =tegra_powergate_sequence_power_up (dc->powergate, dc->clk, dc->rst);if (err <0 ) { -dev_err (dev,"failed to power partition: %d\n" , err); +DRM_DEV_ERROR (dev, +"failed to power partition: %d\n" , err);return err; } }else { err =clk_prepare_enable (dc->clk);if (err <0 ) { -dev_err (dev,"failed to enable clock: %d\n" , err); +DRM_DEV_ERROR (dev,"failed to enable clock: %d\n" , err);return err; }if (!dc->soc->broken_reset) { err =reset_control_deassert (dc->rst);if (err <0 ) { -dev_err (dev, +DRM_DEV_ERROR (dev,"failed to deassert reset: %d\n" , err);return err; }
drivers/gpu/drm/tegra/dpaux.c +13 -11
@@ -446,14 +446,14 @@ static int tegra_dpaux_probe(struct platform_device *pdev) dpaux->irq =platform_get_irq (pdev,0 );if (dpaux->irq <0 ) { -dev_err (&pdev->dev,"failed to get IRQ\n" ); +DRM_DEV_ERROR (&pdev->dev,"failed to get IRQ\n" );return -ENXIO ; }if (!pdev->dev.pm_domain) { dpaux->rst =devm_reset_control_get (&pdev->dev,"dpaux" );if (IS_ERR (dpaux->rst)) { -dev_err (&pdev->dev, +DRM_DEV_ERROR (&pdev->dev,"failed to get reset control: %ld\n" ,PTR_ERR (dpaux->rst));return PTR_ERR (dpaux->rst);
@@ -462,14 +462,14 @@ static int tegra_dpaux_probe(struct platform_device *pdev) dpaux->clk =devm_clk_get (&pdev->dev,NULL );if (IS_ERR (dpaux->clk)) { -dev_err (&pdev->dev,"failed to get module clock: %ld\n" , +DRM_DEV_ERROR (&pdev->dev,"failed to get module clock: %ld\n" ,PTR_ERR (dpaux->clk));return PTR_ERR (dpaux->clk); } err =clk_prepare_enable (dpaux->clk);if (err <0 ) { -dev_err (&pdev->dev,"failed to enable module clock: %d\n" , +DRM_DEV_ERROR (&pdev->dev,"failed to enable module clock: %d\n" , err);return err; }
@@ -479,7 +479,7 @@ static int tegra_dpaux_probe(struct platform_device *pdev) dpaux->clk_parent =devm_clk_get (&pdev->dev,"parent" );if (IS_ERR (dpaux->clk_parent)) { -dev_err (&pdev->dev,"failed to get parent clock: %ld\n" , +DRM_DEV_ERROR (&pdev->dev,"failed to get parent clock: %ld\n" ,PTR_ERR (dpaux->clk_parent)); err =PTR_ERR (dpaux->clk_parent); goto assert_reset;
@@ -487,21 +487,22 @@ static int tegra_dpaux_probe(struct platform_device *pdev) err =clk_prepare_enable (dpaux->clk_parent);if (err <0 ) { -dev_err (&pdev->dev,"failed to enable parent clock: %d\n" , +DRM_DEV_ERROR (&pdev->dev,"failed to enable parent clock: %d\n" , err); goto assert_reset; } err =clk_set_rate (dpaux->clk_parent,270000000 );if (err <0 ) { -dev_err (&pdev->dev,"failed to set clock to 270 MHz: %d\n" , +DRM_DEV_ERROR (&pdev->dev, +"failed to set clock to 270 MHz: %d\n" , err); goto disable_parent_clk; } dpaux->vdd =devm_regulator_get (&pdev->dev,"vdd" );if (IS_ERR (dpaux->vdd)) { -dev_err (&pdev->dev,"failed to get VDD supply: %ld\n" , +DRM_DEV_ERROR (&pdev->dev,"failed to get VDD supply: %ld\n" ,PTR_ERR (dpaux->vdd)); err =PTR_ERR (dpaux->vdd); goto disable_parent_clk;
@@ -510,7 +511,7 @@ static int tegra_dpaux_probe(struct platform_device *pdev) err =devm_request_irq (dpaux->dev, dpaux->irq, tegra_dpaux_irq,0 ,dev_name (dpaux->dev), dpaux);if (err <0 ) { -dev_err (dpaux->dev,"failed to request IRQ#%u: %d\n" , +DRM_DEV_ERROR (dpaux->dev,"failed to request IRQ#%u: %d\n" , dpaux->irq, err); goto disable_parent_clk; }
@@ -546,7 +547,7 @@ static int tegra_dpaux_probe(struct platform_device *pdev) dpaux->pinctrl =devm_pinctrl_register (&pdev->dev, &dpaux->desc, dpaux);if (IS_ERR (dpaux->pinctrl)) { -dev_err (&pdev->dev,"failed to register pincontrol\n" ); +DRM_DEV_ERROR (&pdev->dev,"failed to register pincontrol\n" );return PTR_ERR (dpaux->pinctrl); }#endif
@@ -779,7 +780,8 @@ int drm_dp_aux_train(struct drm_dp_aux *aux, struct drm_dp_link *link,break ;default : -dev_err (aux->dev,"unsupported training pattern %u\n" , tp); +DRM_DEV_ERROR (aux->dev, +"unsupported training pattern %u\n" , tp);return -EINVAL ; }
drivers/gpu/drm/tegra/dsi.c +40 -28
223 lines not on this page · raw message
drivers/gpu/drm/tegra/falcon.c +9 -7
@@ -75,7 +75,7 @@ static void falcon_copy_firmware_image(struct falcon *falcon, falcon->firmware.size, DMA_TO_DEVICE); err =dma_mapping_error (falcon->dev, daddr);if (err) { -dev_err (falcon->dev,"failed to map firmware: %d\n" , err); +DRM_DEV_ERROR (falcon->dev,"failed to map firmware: %d\n" , err);return ; } dma_sync_single_for_device(falcon->dev, daddr,
@@ -91,19 +91,20 @@ static int falcon_parse_firmware_image(struct falcon *falcon)/* endian problems would show up right here */ if (bin->magic !=PCI_VENDOR_ID_NVIDIA ) { -dev_err (falcon->dev,"incorrect firmware magic\n" ); +DRM_DEV_ERROR (falcon->dev,"incorrect firmware magic\n" );return -EINVAL ; }/* currently only version 1 is supported */ if (bin->version !=1 ) { -dev_err (falcon->dev,"unsupported firmware version\n" ); +DRM_DEV_ERROR (falcon->dev,"unsupported firmware version\n" );return -EINVAL ; }/* check that the firmware size is consistent */ if (bin->size > falcon->firmware.size) { -dev_err (falcon->dev,"firmware image size inconsistency\n" ); +DRM_DEV_ERROR (falcon->dev, +"firmware image size inconsistency\n" );return -EINVAL ; }
@@ -142,7 +143,7 @@ int falcon_load_firmware(struct falcon *falcon) falcon->firmware.vaddr = falcon->ops->alloc (falcon, firmware->size, &falcon->firmware.paddr);if (!falcon->firmware.vaddr) { -dev_err (falcon->dev,"dma memory mapping failed\n" ); +DRM_DEV_ERROR (falcon->dev,"dma memory mapping failed\n" );return -ENOMEM ; }
@@ -152,7 +153,7 @@ int falcon_load_firmware(struct falcon *falcon)/* parse the image data */ err =falcon_parse_firmware_image (falcon);if (err <0 ) { -dev_err (falcon->dev,"failed to parse firmware image\n" ); +DRM_DEV_ERROR (falcon->dev,"failed to parse firmware image\n" ); goto err_setup_firmware_image; }
@@ -245,7 +246,8 @@ int falcon_boot(struct falcon *falcon) err =falcon_wait_idle (falcon);if (err <0 ) { -dev_err (falcon->dev,"Falcon boot failed due to timeout\n" ); +DRM_DEV_ERROR (falcon->dev, +"Falcon boot failed due to timeout\n" );return err; }
drivers/gpu/drm/tegra/fb.c +14 -8
@@ -138,7 +138,8 @@ static struct tegra_fb *tegra_fb_alloc(struct drm_device *drm, err =drm_framebuffer_init (drm, &fb->base, &tegra_fb_funcs);if (err <0 ) { -dev_err (drm->dev,"failed to initialize framebuffer: %d\n" , +DRM_DEV_ERROR (drm->dev, +"failed to initialize framebuffer: %d\n" , err);kfree (fb->planes);kfree (fb);
@@ -241,7 +242,8 @@ static int tegra_fbdev_probe(struct drm_fb_helper *helper, info =drm_fb_helper_alloc_fbi (helper);if (IS_ERR (info)) { -dev_err (drm->dev,"failed to allocate framebuffer info\n" ); +DRM_DEV_ERROR (drm->dev, +"failed to allocate framebuffer info\n" );drm_gem_object_put_unlocked (&bo->gem);return PTR_ERR (info); }
@@ -249,7 +251,8 @@ static int tegra_fbdev_probe(struct drm_fb_helper *helper, fbdev->fb =tegra_fb_alloc (drm, &cmd, &bo,1 );if (IS_ERR (fbdev->fb)) { err =PTR_ERR (fbdev->fb); -dev_err (drm->dev,"failed to allocate DRM framebuffer: %d\n" , +DRM_DEV_ERROR (drm->dev, +"failed to allocate DRM framebuffer: %d\n" , err);drm_gem_object_put_unlocked (&bo->gem);return PTR_ERR (fbdev->fb);
@@ -273,7 +276,8 @@ static int tegra_fbdev_probe(struct drm_fb_helper *helper, bo->vaddr =vmap (bo->pages, bo->num_pages,VM_MAP ,pgprot_writecombine (PAGE_KERNEL ));if (!bo->vaddr) { -dev_err (drm->dev,"failed to vmap() framebuffer\n" ); +DRM_DEV_ERROR (drm->dev, +"failed to vmap() framebuffer\n" ); err = -ENOMEM ; goto destroy; }
@@ -302,7 +306,7 @@ static struct tegra_fbdev *tegra_fbdev_create(struct drm_device *drm) fbdev =kzalloc (sizeof (*fbdev),GFP_KERNEL );if (!fbdev) { -dev_err (drm->dev,"failed to allocate DRM fbdev\n" ); +DRM_DEV_ERROR (drm->dev,"failed to allocate DRM fbdev\n" );return ERR_PTR (-ENOMEM ); }
@@ -326,20 +330,22 @@ static int tegra_fbdev_init(struct tegra_fbdev *fbdev, err =drm_fb_helper_init (drm, &fbdev->base, max_connectors);if (err <0 ) { -dev_err (drm->dev,"failed to initialize DRM FB helper: %d\n" , +DRM_DEV_ERROR (drm->dev, +"failed to initialize DRM FB helper: %d\n" , err);return err; } err =drm_fb_helper_single_add_all_connectors (&fbdev->base);if (err <0 ) { -dev_err (drm->dev,"failed to add connectors: %d\n" , err); +DRM_DEV_ERROR (drm->dev,"failed to add connectors: %d\n" , err); goto fini; } err =drm_fb_helper_initial_config (&fbdev->base, preferred_bpp);if (err <0 ) { -dev_err (drm->dev,"failed to set initial configuration: %d\n" , +DRM_DEV_ERROR (drm->dev, +"failed to set initial configuration: %d\n" , err); goto fini; }
drivers/gpu/drm/tegra/gem.c +5 -3
@@ -128,7 +128,8 @@ static int tegra_bo_iommu_map(struct tegra_drm *tegra, struct tegra_bo *bo) err =drm_mm_insert_node_generic (&tegra->mm, bo->mm, bo->gem.size,PAGE_SIZE ,0 ,0 );if (err <0 ) { -dev_err (tegra->drm->dev,"out of I/O virtual memory: %zd\n" , +DRM_DEV_ERROR (tegra->drm->dev, +"out of I/O virtual memory: %zd\n" , err); goto unlock; }
@@ -138,7 +139,8 @@ static int tegra_bo_iommu_map(struct tegra_drm *tegra, struct tegra_bo *bo) err =iommu_map_sg (tegra->domain, bo->paddr, bo->sgt->sgl, bo->sgt->nents, prot);if (err <0 ) { -dev_err (tegra->drm->dev,"failed to map buffer: %zd\n" , err); +DRM_DEV_ERROR (tegra->drm->dev, +"failed to map buffer: %zd\n" , err); goto remove; }
@@ -268,7 +270,7 @@ static int tegra_bo_alloc(struct drm_device *drm, struct tegra_bo *bo) bo->vaddr =dma_alloc_wc (drm->dev, size, &bo->paddr,GFP_KERNEL | __GFP_NOWARN);if (!bo->vaddr) { -dev_err (drm->dev, +DRM_DEV_ERROR (drm->dev,"failed to allocate buffer of size %zu\n" , size);return -ENOMEM ;
drivers/gpu/drm/tegra/gr2d.c +6 -4
@@ -164,13 +164,13 @@ static int gr2d_probe(struct platform_device *pdev) gr2d->clk =devm_clk_get (dev,NULL );if (IS_ERR (gr2d->clk)) { -dev_err (dev,"cannot get clock\n" ); +DRM_DEV_ERROR (dev,"cannot get clock\n" );return PTR_ERR (gr2d->clk); } err =clk_prepare_enable (gr2d->clk);if (err) { -dev_err (dev,"cannot turn on clock\n" ); +DRM_DEV_ERROR (dev,"cannot turn on clock\n" );return err; }
@@ -186,7 +186,8 @@ static int gr2d_probe(struct platform_device *pdev) err =host1x_client_register (&gr2d->client.base);if (err <0 ) { -dev_err (dev,"failed to register host1x client: %d\n" , err); +DRM_DEV_ERROR (dev, +"failed to register host1x client: %d\n" , err);clk_disable_unprepare (gr2d->clk);return err; }
@@ -207,7 +208,8 @@ static int gr2d_remove(struct platform_device *pdev) err =host1x_client_unregister (&gr2d->client.base);if (err <0 ) { -dev_err (&pdev->dev,"failed to unregister host1x client: %d\n" , +DRM_DEV_ERROR (&pdev->dev, +"failed to unregister host1x client: %d\n" , err);return err; }
drivers/gpu/drm/tegra/gr3d.c +12 -8
@@ -256,27 +256,29 @@ static int gr3d_probe(struct platform_device *pdev) gr3d->clk =devm_clk_get (&pdev->dev,NULL );if (IS_ERR (gr3d->clk)) { -dev_err (&pdev->dev,"cannot get clock\n" ); +DRM_DEV_ERROR (&pdev->dev,"cannot get clock\n" );return PTR_ERR (gr3d->clk); } gr3d->rst =devm_reset_control_get (&pdev->dev,"3d" );if (IS_ERR (gr3d->rst)) { -dev_err (&pdev->dev,"cannot get reset\n" ); +DRM_DEV_ERROR (&pdev->dev,"cannot get reset\n" );return PTR_ERR (gr3d->rst); }if (of_device_is_compatible (np,"nvidia,tegra30-gr3d" )) { gr3d->clk_secondary =devm_clk_get (&pdev->dev,"3d2" );if (IS_ERR (gr3d->clk_secondary)) { -dev_err (&pdev->dev,"cannot get secondary clock\n" ); +DRM_DEV_ERROR (&pdev->dev, +"cannot get secondary clock\n" );return PTR_ERR (gr3d->clk_secondary); } gr3d->rst_secondary =devm_reset_control_get (&pdev->dev,"3d2" );if (IS_ERR (gr3d->rst_secondary)) { -dev_err (&pdev->dev,"cannot get secondary reset\n" ); +DRM_DEV_ERROR (&pdev->dev, +"cannot get secondary reset\n" );return PTR_ERR (gr3d->rst_secondary); } }
@@ -284,7 +286,7 @@ static int gr3d_probe(struct platform_device *pdev) err =tegra_powergate_sequence_power_up (TEGRA_POWERGATE_3D , gr3d->clk, gr3d->rst);if (err <0 ) { -dev_err (&pdev->dev,"failed to power up 3D unit\n" ); +DRM_DEV_ERROR (&pdev->dev,"failed to power up 3D unit\n" );return err; }
@@ -293,7 +295,7 @@ static int gr3d_probe(struct platform_device *pdev) gr3d->clk_secondary, gr3d->rst_secondary);if (err <0 ) { -dev_err (&pdev->dev, +DRM_DEV_ERROR (&pdev->dev,"failed to power up secondary 3D unit\n" );return err; }
@@ -311,7 +313,8 @@ static int gr3d_probe(struct platform_device *pdev) err =host1x_client_register (&gr3d->client.base);if (err <0 ) { -dev_err (&pdev->dev,"failed to register host1x client: %d\n" , +DRM_DEV_ERROR (&pdev->dev, +"failed to register host1x client: %d\n" , err);return err; }
@@ -332,7 +335,8 @@ static int gr3d_remove(struct platform_device *pdev) err =host1x_client_unregister (&gr3d->client.base);if (err <0 ) { -dev_err (&pdev->dev,"failed to unregister host1x client: %d\n" , +DRM_DEV_ERROR (&pdev->dev, +"failed to unregister host1x client: %d\n" , err);return err; }
drivers/gpu/drm/tegra/hdmi.c +40 -26
214 lines not on this page · raw message
drivers/gpu/drm/tegra/output.c +5 -3
@@ -132,13 +132,14 @@ int tegra_output_probe(struct tegra_output *output) err =gpio_request_one (output->hpd_gpio,GPIOF_DIR_IN ,"HDMI hotplug detect" );if (err <0 ) { -dev_err (output->dev,"gpio_request_one(): %d\n" , err); +DRM_DEV_ERROR (output->dev, +"gpio_request_one(): %d\n" , err);return err; } err =gpio_to_irq (output->hpd_gpio);if (err <0 ) { -dev_err (output->dev,"gpio_to_irq(): %d\n" , err); +DRM_DEV_ERROR (output->dev,"gpio_to_irq(): %d\n" , err);gpio_free (output->hpd_gpio);return err; }
@@ -151,7 +152,8 @@ int tegra_output_probe(struct tegra_output *output) err =request_threaded_irq (output->hpd_irq,NULL , hpd_irq, flags,"hpd" , output);if (err <0 ) { -dev_err (output->dev,"failed to request IRQ#%u: %d\n" , +DRM_DEV_ERROR (output->dev, +"failed to request IRQ#%u: %d\n" , output->hpd_irq, err);gpio_free (output->hpd_gpio);return err;
drivers/gpu/drm/tegra/rgb.c +7 -5
@@ -201,7 +201,8 @@ static void tegra_rgb_encoder_enable(struct drm_encoder *encoder) err =tegra_dc_state_setup_clock (dc, crtc_state, rgb->clk_parent, pclk, div);if (err <0 ) { -dev_err (output->dev,"failed to setup CRTC state: %d\n" , err); +DRM_DEV_ERROR (output->dev, +"failed to setup CRTC state: %d\n" , err);return err; }
@@ -238,19 +239,19 @@ int tegra_dc_rgb_probe(struct tegra_dc *dc) rgb->clk =devm_clk_get (dc->dev,NULL );if (IS_ERR (rgb->clk)) { -dev_err (dc->dev,"failed to get clock\n" ); +DRM_DEV_ERROR (dc->dev,"failed to get clock\n" );return PTR_ERR (rgb->clk); } rgb->clk_parent =devm_clk_get (dc->dev,"parent" );if (IS_ERR (rgb->clk_parent)) { -dev_err (dc->dev,"failed to get parent clock\n" ); +DRM_DEV_ERROR (dc->dev,"failed to get parent clock\n" );return PTR_ERR (rgb->clk_parent); } err =clk_set_parent (rgb->clk, rgb->clk_parent);if (err <0 ) { -dev_err (dc->dev,"failed to set parent clock: %d\n" , err); +DRM_DEV_ERROR (dc->dev,"failed to set parent clock: %d\n" , err);return err; }
@@ -295,7 +296,8 @@ int tegra_dc_rgb_init(struct drm_device *drm, struct tegra_dc *dc) err =tegra_output_init (drm, output);if (err <0 ) { -dev_err (output->dev,"failed to initialize output: %d\n" , err); +DRM_DEV_ERROR (output->dev, +"failed to initialize output: %d\n" , err);return err; }
drivers/gpu/drm/tegra/sor.c +112 -72
573 lines not on this page · raw message
drivers/gpu/drm/tegra/vic.c +9 -6
@@ -104,7 +104,7 @@ static int vic_boot(struct vic *vic) err =falcon_wait_idle (&vic->falcon);if (err <0 ) { -dev_err (vic->dev, +DRM_DEV_ERROR (vic->dev,"failed to set application ID and FCE base\n" );return err; }
@@ -146,7 +146,8 @@ static int vic_init(struct host1x_client *client)if (tegra->domain) { err =iommu_attach_device (tegra->domain, vic->dev);if (err <0 ) { -dev_err (vic->dev,"failed to attach to domain: %d\n" , +DRM_DEV_ERROR (vic->dev, +"failed to attach to domain: %d\n" , err);return err; }
@@ -299,7 +300,7 @@ static int vic_probe(struct platform_device *pdev) regs =platform_get_resource (pdev,IORESOURCE_MEM ,0 );if (!regs) { -dev_err (&pdev->dev,"failed to get registers\n" ); +DRM_DEV_ERROR (&pdev->dev,"failed to get registers\n" );return -ENXIO ; }
@@ -309,7 +310,7 @@ static int vic_probe(struct platform_device *pdev) vic->clk =devm_clk_get (dev,NULL );if (IS_ERR (vic->clk)) { -dev_err (&pdev->dev,"failed to get clock\n" ); +DRM_DEV_ERROR (&pdev->dev,"failed to get clock\n" );return PTR_ERR (vic->clk); }
@@ -341,7 +342,8 @@ static int vic_probe(struct platform_device *pdev) err =host1x_client_register (&vic->client.base);if (err <0 ) { -dev_err (dev,"failed to register host1x client: %d\n" , err); +DRM_DEV_ERROR (dev, +"failed to register host1x client: %d\n" , err);platform_set_drvdata (pdev,NULL ); goto exit_falcon; }
@@ -370,7 +372,8 @@ static int vic_remove(struct platform_device *pdev) err =host1x_client_unregister (&vic->client.base);if (err <0 ) { -dev_err (&pdev->dev,"failed to unregister host1x client: %d\n" , +DRM_DEV_ERROR (&pdev->dev, +"failed to unregister host1x client: %d\n" , err);return err; }
Signature · 1 line
1.9.1
Quoted 91 lines · Harsha Sharma
Replace all occurences of dev_info/err/dbg with DRM_DEV_INFO/ ERROR/DEBUG as we have DRM_DEV_* variants of drm print macros Done using following coccinelle semantic patch
@r@
@@(
(quoted diff) +1
-1-dev_info +DRM_DEV_INFO|
(quoted diff) +1
-1-dev_err +DRM_DEV_ERROR|
(quoted diff) +1
-1-dev_dbg +DRM_DEV_DEBUG)
Signed-off-by Harsha Sharma <[email protected]>---
Changes in v2:
-Break line over 80 characters
-Changes in comments not requireddrivers/gpu/drm/tegra/dc.c | 53 +++++++----- drivers/gpu/drm/tegra/dpaux.c | 24 +++--- drivers/gpu/drm/tegra/dsi.c | 68 ++++++++------- drivers/gpu/drm/tegra/falcon.c | 16 ++-- drivers/gpu/drm/tegra/fb.c | 22 +++-- drivers/gpu/drm/tegra/gem.c | 8 +- drivers/gpu/drm/tegra/gr2d.c | 10 ++- drivers/gpu/drm/tegra/gr3d.c | 20 +++-- drivers/gpu/drm/tegra/hdmi.c | 66 +++++++++------ drivers/gpu/drm/tegra/output.c | 8 +- drivers/gpu/drm/tegra/rgb.c | 12 +-- drivers/gpu/drm/tegra/sor.c | 184 +++++++++++++++++++++++++---------------- drivers/gpu/drm/tegra/vic.c | 15 ++-- 13 files changed, 304 insertions(+), 202 deletions(-)drivers/gpu/drm/tegra/dc.c +7
-5@@ -1137,7 +1137,7 @@ static void tegra_dc_commit_state(struct tegra_dc *dc, err =clk_set_parent (dc->clk, state->clk);if (err <0 ) -dev_err (dc->dev,"failed to set parent clock: %d\n" , err); +DRM_DEV_ERROR (dc->dev,"failed to set parent clock: %d\n" , err);/* * Outputs may not want to change the parent clock rate. This is only @@ -1150,7 +1150,7 @@ static void tegra_dc_commit_state(struct tegra_dc *dc,if (state->pclk >0 ) { err =clk_set_rate (state->clk, state->pclk);if (err <0 ) -dev_err (dc->dev, +DRM_DEV_ERROR (dc->dev,"failed to set clock rate to %lu Hz\n" , state->pclk); }@@ -1195,7 +1195,7 @@ static int tegra_dc_wait_idle(struct tegra_dc *dc, unsigned long timeout)usleep_range (1000 ,2000 ); } -dev_dbg (dc->dev,"timeout waiting for DC to become idle\n" ); +DRM_DEV_DEBUG (dc->dev,"timeout waiting for DC to become idle\n" );return -ETIMEDOUT ; }@@ -1763,7 +1763,8 @@ static int tegra_dc_init(struct host1x_client *client)if (tegra->domain) { err =iommu_attach_device (tegra->domain, dc->dev);if (err <0 ) { -dev_err (dc->dev,"failed to attach to domain: %d\n" , +DRM_DEV_ERROR (dc->dev, +"failed to attach to domain: %d\n" , err);return err; }@@ -1801,7 +1802,8 @@ static int tegra_dc_init(struct host1x_client *client) err =tegra_dc_rgb_init (drm, dc);if (err <0 && err != -ENODEV ) { -dev_err (dc->dev,"failed to initialize RGB output: %d\n" , err); +DRM_DEV_ERROR (dc->dev, +"failed to initialize RGB output: %d\n" , err); goto cleanup; }
drivers/gpu/drm/tegra/dc.c static int tegra_dc_init(struct host1x_client *client) · line 1818
Quoted 6 lines
drivers/gpu/drm/tegra/dc.c +2
-1@@ -1812,13 +1814,15 @@ static int tegra_dc_init(struct host1x_client *client)if (IS_ENABLED (CONFIG_DEBUG_FS )) { err =tegra_dc_debugfs_init (dc, drm->primary);if (err <0 ) -dev_err (dc->dev,"debugfs setup failed: %d\n" , err); +DRM_DEV_ERROR (dc->dev, +"debugfs setup failed: %d\n" , err);
The string could be on the same line as the function name. Just the err could be moved to the next line, and lined up with the right side of the (.
Overall, looking through the rest, it would probably really be nicer to line the extra arguments up with the right side of the (.
drivers/gpu/drm/tegra/dc.c static int tegra_dc_init(struct host1x_client *client) · line 1825
Quoted 8 lines
drivers/gpu/drm/tegra/dc.c +2
-1} err =devm_request_irq (dc->dev, dc->irq, tegra_dc_irq,0 ,dev_name (dc->dev), dc);if (err <0 ) { - dev_err(dc->dev, "failed to request IRQ#%u: %d\n", dc->irq, + DRM_DEV_ERROR(dc->dev, + "failed to request IRQ#%u: %d\n", dc->irq,
Same here. Try to keep the string on the first line.
drivers/gpu/drm/tegra/dc.c static int tegra_dc_exit(struct host1x_client *client) · line 1858
Quoted 10 lines
drivers/gpu/drm/tegra/dc.c +2
-1err); goto cleanup; }@@ -1850,12 +1854,14 @@ static int tegra_dc_exit(struct host1x_client *client)if (IS_ENABLED (CONFIG_DEBUG_FS )) { err =tegra_dc_debugfs_exit (dc);if (err <0 ) -dev_err (dc->dev,"debugfs cleanup failed: %d\n" , err); +DRM_DEV_ERROR (dc->dev, +"debugfs cleanup failed: %d\n" , err);
Same here. And so on.
[...]
drivers/gpu/drm/tegra/dsi.c static void tegra_dsi_unprepare(struct tegra_dsi *dsi) · line 858
Quoted 11 lines
drivers/gpu/drm/tegra/dsi.c +2
-1@@ -854,7 +854,8 @@ static void tegra_dsi_unprepare(struct tegra_dsi *dsi) err =tegra_mipi_disable (dsi->mipi);if (err <0 ) - dev_err(dsi->dev, "failed to disable MIPI calibration: %d\n", + DRM_DEV_ERROR(dsi->dev, + "failed to disable MIPI calibration: %d\n",
Here the string is much too far to the left.
julia
Hi,
Thanks a lot for your feedback.
I will send another version for this patch.
Thanks for your time.
Regards,
Harsha Sharma
Quoted 159 lines · Julia Lawall
Quoted 24 lines · Harsha Sharma
Replace all occurences of dev_info/err/dbg with DRM_DEV_INFO/ ERROR/DEBUG as we have DRM_DEV_* variants of drm print macros Done using following coccinelle semantic patch
@r@
@@(
(quoted diff) +1
-1-dev_info +DRM_DEV_INFO|
(quoted diff) +1
-1-dev_err +DRM_DEV_ERROR|
(quoted diff) +1
-1-dev_dbg +DRM_DEV_DEBUG)
Signed-off-by Harsha Sharma <[email protected]>---
Changes in v2:
-Break line over 80 characters
-Changes in comments not requiredQuoted 12 lines
drivers/gpu/drm/tegra/dc.c | 53 +++++++----- drivers/gpu/drm/tegra/dpaux.c | 24 +++--- drivers/gpu/drm/tegra/dsi.c | 68 ++++++++------- drivers/gpu/drm/tegra/falcon.c | 16 ++-- drivers/gpu/drm/tegra/fb.c | 22 +++-- drivers/gpu/drm/tegra/gem.c | 8 +- drivers/gpu/drm/tegra/gr2d.c | 10 ++- drivers/gpu/drm/tegra/gr3d.c | 20 +++-- drivers/gpu/drm/tegra/hdmi.c | 66 +++++++++------ drivers/gpu/drm/tegra/output.c | 8 +- drivers/gpu/drm/tegra/rgb.c | 12 +-- drivers/gpu/drm/tegra/sor.c | 184 +++++++++++++++++++++++++----------------
drivers/gpu/drm/tegra/dc.c static void tegra_dc_commit_state(struct tegra_dc
Quoted 8 lines
drivers/gpu/drm/tegra/vic.c | 15 ++-- 13 files changed, 304 insertions(+), 202 deletions(-)drivers/gpu/drm/tegra/dc.c +0
-0@@ -1137,7 +1137,7 @@ static void tegra_dc_commit_state(struct tegra_dc*dc,
drivers/gpu/drm/tegra/dc.c static void tegra_dc_commit_state(struct tegra_dc *dc,
Quoted 5 lines
drivers/gpu/drm/tegra/dc.c +1
-1err =clk_set_parent (dc->clk, state->clk);if (err <0 ) -dev_err (dc->dev,"failed to set parent clock: %d\n" , err); + DRM_DEV_ERROR(dc->dev, "failed to set parent clock: %d\n",err);
drivers/gpu/drm/tegra/dc.c static void tegra_dc_commit_state(struct tegra_dc · line 1141
Quoted 3 lines
drivers/gpu/drm/tegra/dc.c +0
-0/* * Outputs may not want to change the parent clock rate. This is only
drivers/gpu/drm/tegra/dc.c static void tegra_dc_commit_state(struct tegra_dc
Quoted 1 line
drivers/gpu/drm/tegra/dc.c +0
-0@@ -1150,7 +1150,7 @@ static void tegra_dc_commit_state(struct tegra_dc*dc,
drivers/gpu/drm/tegra/dc.c static int tegra_dc_wait_idle(struct tegra_dc *dc,
Quoted 9 lines
drivers/gpu/drm/tegra/dc.c +1
-1if (state->pclk >0 ) { err =clk_set_rate (state->clk, state->pclk);if (err <0 ) -dev_err (dc->dev, +DRM_DEV_ERROR (dc->dev,"failed to set clock rate to %lu Hz\n" , state->pclk); }@@ -1195,7 +1195,7 @@ static int tegra_dc_wait_idle(struct tegra_dc *dc,unsigned long timeout)
drivers/gpu/drm/tegra/dc.c static int tegra_dc_init(struct host1x_client
Quoted 9 lines
drivers/gpu/drm/tegra/dc.c +1
-1usleep_range (1000 ,2000 ); } -dev_dbg (dc->dev,"timeout waiting for DC to become idle\n" ); +DRM_DEV_DEBUG (dc->dev,"timeout waiting for DC to become idle\n" );return -ETIMEDOUT ; }@@ -1763,7 +1763,8 @@ static int tegra_dc_init(struct host1x_client*client)
drivers/gpu/drm/tegra/dc.c static int tegra_dc_init(struct host1x_client *client)
Quoted 4 lines
drivers/gpu/drm/tegra/dc.c +0
-1if (tegra->domain) { err =iommu_attach_device (tegra->domain, dc->dev);if (err <0 ) { - dev_err(dc->dev, "failed to attach to domain:%d\n",
drivers/gpu/drm/tegra/dc.c static int tegra_dc_init(struct host1x_client
Quoted 6 lines
drivers/gpu/drm/tegra/dc.c +2
-0+DRM_DEV_ERROR (dc->dev, +"failed to attach to domain: %d\n" , err);return err; }@@ -1801,7 +1802,8 @@ static int tegra_dc_init(struct host1x_client*client)
drivers/gpu/drm/tegra/dc.c static int tegra_dc_init(struct host1x_client *client)
Quoted 4 lines
drivers/gpu/drm/tegra/dc.c +0
-1err =tegra_dc_rgb_init (drm, dc);if (err <0 && err != -ENODEV ) { - dev_err(dc->dev, "failed to initialize RGB output: %d\n",err);
drivers/gpu/drm/tegra/dc.c static int tegra_dc_init(struct host1x_client
Quoted 6 lines
drivers/gpu/drm/tegra/dc.c +2
-0+DRM_DEV_ERROR (dc->dev, +"failed to initialize RGB output: %d\n" , err); goto cleanup; }@@ -1812,13 +1814,15 @@ static int tegra_dc_init(struct host1x_client*client)
drivers/gpu/drm/tegra/dc.c static int tegra_dc_init(struct host1x_client *client)
Quoted 4 lines
drivers/gpu/drm/tegra/dc.c +0
-1if (IS_ENABLED (CONFIG_DEBUG_FS )) { err =tegra_dc_debugfs_init (dc, drm->primary);if (err <0 ) - dev_err(dc->dev, "debugfs setup failed: %d\n",err);
drivers/gpu/drm/tegra/dc.c static int tegra_dc_init(struct host1x_client *client) · line 1818
Quoted 2 lines
drivers/gpu/drm/tegra/dc.c +2
-0+DRM_DEV_ERROR (dc->dev, +"debugfs setup failed: %d\n" , err);The string could be on the same line as the function name. Just the err could be moved to the next line, and lined up with the right side of the (.
Overall, looking through the rest, it would probably really be nicer to line the extra arguments up with the right side of the (.
drivers/gpu/drm/tegra/dc.c static int tegra_dc_init(struct host1x_client *client) · line 1825
Quoted 8 lines
drivers/gpu/drm/tegra/dc.c +2
-1} err =devm_request_irq (dc->dev, dc->irq, tegra_dc_irq,0 ,dev_name (dc->dev), dc);if (err <0 ) { - dev_err(dc->dev, "failed to request IRQ#%u: %d\n", dc->irq, + DRM_DEV_ERROR(dc->dev, + "failed to request IRQ#%u: %d\n", dc->irq,Same here. Try to keep the string on the first line.
drivers/gpu/drm/tegra/dc.c static int tegra_dc_exit(struct host1x_client
Quoted 4 lines
drivers/gpu/drm/tegra/dc.c +0
-0err); goto cleanup; }@@ -1850,12 +1854,14 @@ static int tegra_dc_exit(struct host1x_client*client)
drivers/gpu/drm/tegra/dc.c static int tegra_dc_exit(struct host1x_client *client)
Quoted 4 lines
drivers/gpu/drm/tegra/dc.c +0
-1if (IS_ENABLED (CONFIG_DEBUG_FS )) { err =tegra_dc_debugfs_exit (dc);if (err <0 ) - dev_err(dc->dev, "debugfs cleanup failed: %d\n",err);
drivers/gpu/drm/tegra/dc.c static int tegra_dc_exit(struct host1x_client *client) · line 1858
Quoted 2 lines
drivers/gpu/drm/tegra/dc.c +2
-0+DRM_DEV_ERROR (dc->dev, +"debugfs cleanup failed: %d\n" , err);Same here. And so on.
[...]
drivers/gpu/drm/tegra/dsi.c static void tegra_dsi_unprepare(struct tegra_dsi
Quoted 5 lines
drivers/gpu/drm/tegra/dsi.c +0
-0@@ -854,7 +854,8 @@ static void tegra_dsi_unprepare(struct tegra_dsi*dsi)
drivers/gpu/drm/tegra/dsi.c static void tegra_dsi_unprepare(struct tegra_dsi *dsi)
Quoted 4 lines
drivers/gpu/drm/tegra/dsi.c +0
-1err =tegra_mipi_disable (dsi->mipi);if (err <0 ) - dev_err(dsi->dev, "failed to disable MIPI calibration:
Quoted 8 lines
%d\n",
drivers/gpu/drm/tegra/dsi.c static void tegra_dsi_unprepare(struct tegra_dsi *dsi) · line 858
Quoted 2 lines
drivers/gpu/drm/tegra/dsi.c +2
-0+ DRM_DEV_ERROR(dsi->dev, + "failed to disable MIPI calibration: %d\n",Here the string is much too far to the left.
julia
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 18 lines · Harsha Sharma
Replace all occurences of dev_info/err/dbg with DRM_DEV_INFO/ ERROR/DEBUG as we have DRM_DEV_* variants of drm print macros Done using following coccinelle semantic patch
@r@
@@(
(quoted diff) +1
-1-dev_info +DRM_DEV_INFO|
(quoted diff) +1
-1-dev_err +DRM_DEV_ERROR|
(quoted diff) +1
-1-dev_dbg +DRM_DEV_DEBUG)
Quoted 5 lines
Signed-off-by Harsha Sharma <[email protected]>---
Changes in v2:
-Break line over 80 characters
-Changes in comments not required
Please don't do this. Most of the functions that you're trying to replace here are not DRM_DEV_*() for a very specific reason: none of them have anything to do with DRM/KMS in particular. This is important, in my opinion, because these messages are very device-specific and the additional information added by the DRM format string aren't useful in the context.
Perhaps the only ones I consider to be good candidates for this conversion are the ones in drivers/gpu/drm/tegra/fb.c because they deal with the DRM fbdev setup and hence are not device specific. And even in those cases I'm not sure we gain very much by this conversion, especially since most of the replacements now end up having to split up argument lists.
Sorry if this isn't documented anywhere. I also suspect other driver maintainers will be less picky about this sort of thing, so you might have more luck there.
Thierry
Harsha,
Quoted 41 lines
@r@
@@(
(quoted diff) +1
-1-dev_info +DRM_DEV_INFO|
(quoted diff) +1
-1-dev_err +DRM_DEV_ERROR|
(quoted diff) +1
-1-dev_dbg +DRM_DEV_DEBUG)
Signed-off-by Harsha Sharma <[email protected]>---
Changes in v2:
-Break line over 80 characters
-Changes in comments not requireddrivers/gpu/drm/tegra/dc.c | 53 +++++++----- drivers/gpu/drm/tegra/dpaux.c | 24 +++--- drivers/gpu/drm/tegra/dsi.c | 68 ++++++++------- drivers/gpu/drm/tegra/falcon.c | 16 ++-- drivers/gpu/drm/tegra/fb.c | 22 +++-- drivers/gpu/drm/tegra/gem.c | 8 +- drivers/gpu/drm/tegra/gr2d.c | 10 ++- drivers/gpu/drm/tegra/gr3d.c | 20 +++-- drivers/gpu/drm/tegra/hdmi.c | 66 +++++++++------ drivers/gpu/drm/tegra/output.c | 8 +- drivers/gpu/drm/tegra/rgb.c | 12 +-- drivers/gpu/drm/tegra/sor.c | 184 +++++++++++++++++++++++++---------------- drivers/gpu/drm/tegra/vic.c | 15 ++-- 13 files changed, 304 insertions(+), 202 deletions(-)drivers/gpu/drm/tegra/dc.c +0
-0
drivers/gpu/drm/tegra/dc.c static void tegra_dc_commit_state(struct tegra_dc *dc, · line 1137
Quoted 1 line
drivers/gpu/drm/tegra/dc.c +0
-0@@ -1137,7 +1137,7 @@ static void tegra_dc_commit_state(struct tegra_dc *dc,
One of the first things you'll probably need to do is to break this
huge patch into
smaller chunks. It becomes difficult to even review this patch(though the change is
pretty straight forward.).
- Allen
Quoted 19 lines · Thierry Reding
Quoted 18 lines · Harsha Sharma
Replace all occurences of dev_info/err/dbg with DRM_DEV_INFO/ ERROR/DEBUG as we have DRM_DEV_* variants of drm print macros Done using following coccinelle semantic patch
@r@
@@(
(quoted diff) +1
-1-dev_info +DRM_DEV_INFO|
(quoted diff) +1
-1-dev_err +DRM_DEV_ERROR|
(quoted diff) +1
-1-dev_dbg +DRM_DEV_DEBUG)
Quoted 12 lines
Quoted 5 lines
Signed-off-by Harsha Sharma <[email protected]>---
Changes in v2:
-Break line over 80 characters
-Changes in comments not requiredPlease don't do this. Most of the functions that you're trying to replace here are not DRM_DEV_*() for a very specific reason: none of them have anything to do with DRM/KMS in particular. This is important, in my opinion, because these messages are very device-specific and the additional information added by the DRM format string aren't useful in the context.
Hey Thierry,
It's likely not useful to a tegra expert such as yourself. However, when I'm switching between platforms or providing log-parsing instructions, it's very useful to say "grep for drm". Without the common drm prefix, the reader needs to know they're looking for tegra-sor, tegra-dc, etc as well.
Not a big deal, I just wanted to provide color for why someone might want this.
Quoted 11 lines
Perhaps the only ones I consider to be good candidates for this conversion are the ones in
drivers/gpu/drm/tegra/fb.cbecause they deal with the DRM fbdev setup and hence are not device specific. And even in those cases I'm not sure we gain very much by this conversion, especially since most of the replacements now end up having to split up argument lists.Sorry if this isn't documented anywhere. I also suspect other driver maintainers will be less picky about this sort of thing, so you might have more luck there.
I think the TODO entry states that contributors should check with the driver maintainers before taking on this work, so it is documented :)
Sean
Quoted 9 lines
Thierry
--
You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] To post to this group, send email to outreachy-kernel-/JYPxA39Uh5TLH3MbocFF+G/[email protected]
To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20170925073841.GA12494%40ulmo.fritz.box.
For more options, visit https://groups.google.com/d/optout.