mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dragan Simic <dsimic@manjaro.org>
To: "Heiko Stübner" <heiko@sntech.de>
Cc: linux-rockchip@lists.infradead.org,
	dri-devel@lists.freedesktop.org, hjc@rock-chips.com,
	andy.yan@rock-chips.com, maarten.lankhorst@linux.intel.com,
	mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com,
	simona@ffwll.ch, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] drm/rockchip: dsi: Perform trivial code cleanups
Date: Fri, 08 Nov 2024 15:05:02 +0100	[thread overview]
Message-ID: <3734f6a5424e3537d717c587a058fc85@manjaro.org> (raw)
In-Reply-To: <13633881.uLZWGnKmhe@diego>

Hello Heiko,

On 2024-11-08 14:56, Heiko Stübner wrote:
> Am Freitag, 8. November 2024, 14:53:57 CET schrieb Dragan Simic:
>> Perform a few trivial code cleanups, to make one logged message a bit 
>> more
>> consistent with the other logged messages by capitalizing its first 
>> word, and
>> to avoid line wrapping by using the 100-column width better.
>> 
>> No intended functional changes are introduced by these code cleanups.
>> 
>> Signed-off-by: Dragan Simic <dsimic@manjaro.org>
>> ---
>>  drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 12 ++++--------
>>  1 file changed, 4 insertions(+), 8 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c 
>> b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
>> index 58a44af0e9ad..f451e70efbdd 100644
>> --- a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
>> +++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
>> @@ -1379,7 +1379,7 @@ static int dw_mipi_dsi_rockchip_probe(struct 
>> platform_device *pdev)
>>  	}
>> 
>>  	if (!dsi->cdata) {
>> -		DRM_DEV_ERROR(dev, "no dsi-config for %s node\n", np->name);
>> +		DRM_DEV_ERROR(dev, "No dsi-config for %s node\n", np->name);
> 
> this is all probe-related, why not convert to dev_err_probe?
> 
> As the doc states [0], DRM_DEV_ERROR is deprecated in favor of dev_err.
> So dev_err_probe would be the correct way to go?

Thanks for your quick response!  Seeing that DRM_DEV_ERROR() is now
deprecated (which I originally missed, in all honesty) makes me very
happy. :)  I've never been a huge fan of the format of the messages
that DRM_DEV_ERROR() produces.

However, perhaps it would be better to keep these patches as-is, as
some kind of an intermediate, limited-scope cleanup + bugfix combo,
and leave the complete DRM_DEV_ERROR() --> dev_err()/dev_err_probe()
conversion to separate patches.  I think it would be better to avoid
a partial conversion, and I'll be more than happy to put the complete
conversion on my TODO list. :)

> [0] 
> https://elixir.bootlin.com/linux/v6.11.6/source/include/drm/drm_print.h#L431
> 
>>  		return -EINVAL;
>>  	}
>> 
>> @@ -1408,19 +1408,16 @@ static int dw_mipi_dsi_rockchip_probe(struct 
>> platform_device *pdev)
>>  			dsi->pllref_clk = NULL;
>>  		} else {
>>  			ret = PTR_ERR(dsi->pllref_clk);
>> -			DRM_DEV_ERROR(dev,
>> -				      "Unable to get pll reference clock: %d\n",
>> -				      ret);
>> +			DRM_DEV_ERROR(dev, "Unable to get pll reference clock: %d\n", 
>> ret);
>>  			return ret;
>>  		}
>>  	}
>> 
>>  	if (dsi->cdata->flags & DW_MIPI_NEEDS_PHY_CFG_CLK) {
>>  		dsi->phy_cfg_clk = devm_clk_get(dev, "phy_cfg");
>>  		if (IS_ERR(dsi->phy_cfg_clk)) {
>>  			ret = PTR_ERR(dsi->phy_cfg_clk);
>> -			DRM_DEV_ERROR(dev,
>> -				      "Unable to get phy_cfg_clk: %d\n", ret);
>> +			DRM_DEV_ERROR(dev, "Unable to get phy_cfg_clk: %d\n", ret);
>>  			return ret;
>>  		}
>>  	}
>> @@ -1465,8 +1462,7 @@ static int dw_mipi_dsi_rockchip_probe(struct 
>> platform_device *pdev)
>>  	if (IS_ERR(dsi->dmd)) {
>>  		ret = PTR_ERR(dsi->dmd);
>>  		if (ret != -EPROBE_DEFER)
>> -			DRM_DEV_ERROR(dev,
>> -				      "Failed to probe dw_mipi_dsi: %d\n", ret);
>> +			DRM_DEV_ERROR(dev, "Failed to probe dw_mipi_dsi: %d\n", ret);
>>  		return ret;
>>  	}
>> 
>> 

  reply	other threads:[~2024-11-08 14:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-08 13:53 [PATCH 0/2] No longer produce error messages when dphy is deferred Dragan Simic
2024-11-08 13:53 ` [PATCH 1/2] drm/rockchip: dsi: Perform trivial code cleanups Dragan Simic
2024-11-08 13:56   ` Heiko Stübner
2024-11-08 14:05     ` Dragan Simic [this message]
2024-11-08 14:09       ` Heiko Stübner
2024-11-08 14:13         ` Dragan Simic
2024-11-08 14:22           ` Heiko Stübner
2024-11-08 14:30             ` Dragan Simic
2024-11-08 14:36               ` Dragan Simic
2024-11-08 13:53 ` [PATCH 2/2] drm/rockchip: dsi: Don't log errors on deferred dphy Dragan Simic
2024-11-08 14:08   ` Sebastian Reichel
2024-11-08 14:18     ` Dragan Simic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3734f6a5424e3537d717c587a058fc85@manjaro.org \
    --to=dsimic@manjaro.org \
    --cc=airlied@gmail.com \
    --cc=andy.yan@rock-chips.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=heiko@sntech.de \
    --cc=hjc@rock-chips.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®