diff mbox series

[1/2] drm/rockchip: dsi: Perform trivial code cleanups

Message ID 35555b58a7284450fb16281514e4e6a3eb9c7b82.1731073565.git.dsimic@manjaro.org (mailing list archive)
State New
Headers show
Series No longer produce error messages when dphy is deferred | expand

Commit Message

Dragan Simic Nov. 8, 2024, 1:53 p.m. UTC
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(-)

Comments

Heiko Stübner Nov. 8, 2024, 1:56 p.m. UTC | #1
Hey Dragan,

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?



[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;
>  	}
>  
>
Dragan Simic Nov. 8, 2024, 2:05 p.m. UTC | #2
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;
>>  	}
>> 
>>
Heiko Stübner Nov. 8, 2024, 2:09 p.m. UTC | #3
Am Freitag, 8. November 2024, 15:05:02 CET schrieb Dragan Simic:
> 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. :)

But your patch-2 really just open-codes, what dev_err_probe is meant
to fix. So with going this way, you're sort of making things worse first,
until that second step happens.

Similarly, reflowing lines for things that get removed in a week do not
serve a purpose - those line-breaks have been that way for years
already.
Dragan Simic Nov. 8, 2024, 2:13 p.m. UTC | #4
On 2024-11-08 15:09, Heiko Stübner wrote:
> Am Freitag, 8. November 2024, 15:05:02 CET schrieb Dragan Simic:
>> 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. :)
> 
> But your patch-2 really just open-codes, what dev_err_probe is meant
> to fix. So with going this way, you're sort of making things worse 
> first,
> until that second step happens.
> 
> Similarly, reflowing lines for things that get removed in a week do not
> serve a purpose - those line-breaks have been that way for years
> already.

Hmm, it makes sense when described that way.  I'll see to perform the
complete conversion in the next few days.
Heiko Stübner Nov. 8, 2024, 2:22 p.m. UTC | #5
Am Freitag, 8. November 2024, 15:13:33 CET schrieb Dragan Simic:
> On 2024-11-08 15:09, Heiko Stübner wrote:
> > Am Freitag, 8. November 2024, 15:05:02 CET schrieb Dragan Simic:
> >> 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. :)
> > 
> > But your patch-2 really just open-codes, what dev_err_probe is meant
> > to fix. So with going this way, you're sort of making things worse 
> > first,
> > until that second step happens.
> > 
> > Similarly, reflowing lines for things that get removed in a week do not
> > serve a purpose - those line-breaks have been that way for years
> > already.
> 
> Hmm, it makes sense when described that way.  I'll see to perform the
> complete conversion in the next few days.

just a note, as written on IRC earlier, I am sitting on a dev_err_probe
conversion for dw-dsi-rockchip.

I was waiting to see if more cleanups turned up, so didn't sent that yet.

Don't want to steal your spotlight though, so not sure if I should send
that or wait for your conversion ;-)


Heiko
Dragan Simic Nov. 8, 2024, 2:30 p.m. UTC | #6
On 2024-11-08 15:22, Heiko Stübner wrote:
> Am Freitag, 8. November 2024, 15:13:33 CET schrieb Dragan Simic:
>> On 2024-11-08 15:09, Heiko Stübner wrote:
>> > Am Freitag, 8. November 2024, 15:05:02 CET schrieb Dragan Simic:
>> >> 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. :)
>> >
>> > But your patch-2 really just open-codes, what dev_err_probe is meant
>> > to fix. So with going this way, you're sort of making things worse
>> > first,
>> > until that second step happens.
>> >
>> > Similarly, reflowing lines for things that get removed in a week do not
>> > serve a purpose - those line-breaks have been that way for years
>> > already.
>> 
>> Hmm, it makes sense when described that way.  I'll see to perform the
>> complete conversion in the next few days.
> 
> just a note, as written on IRC earlier, I am sitting on a dev_err_probe
> conversion for dw-dsi-rockchip.
> 
> I was waiting to see if more cleanups turned up, so didn't sent that 
> yet.
> 
> Don't want to steal your spotlight though, so not sure if I should send
> that or wait for your conversion ;-)

I see no reasons why should we duplicate some effort. :)  If you're
already nearing the file-level conversion to its completion, please
feel free to send it, and we can drop this series. :)
Dragan Simic Nov. 8, 2024, 2:36 p.m. UTC | #7
On 2024-11-08 15:30, Dragan Simic wrote:
> On 2024-11-08 15:22, Heiko Stübner wrote:
>> Am Freitag, 8. November 2024, 15:13:33 CET schrieb Dragan Simic:
>>> On 2024-11-08 15:09, Heiko Stübner wrote:
>>> > Am Freitag, 8. November 2024, 15:05:02 CET schrieb Dragan Simic:
>>> >> 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. :)
>>> >
>>> > But your patch-2 really just open-codes, what dev_err_probe is meant
>>> > to fix. So with going this way, you're sort of making things worse
>>> > first,
>>> > until that second step happens.
>>> >
>>> > Similarly, reflowing lines for things that get removed in a week do not
>>> > serve a purpose - those line-breaks have been that way for years
>>> > already.
>>> 
>>> Hmm, it makes sense when described that way.  I'll see to perform the
>>> complete conversion in the next few days.
>> 
>> just a note, as written on IRC earlier, I am sitting on a 
>> dev_err_probe
>> conversion for dw-dsi-rockchip.
>> 
>> I was waiting to see if more cleanups turned up, so didn't sent that 
>> yet.
>> 
>> Don't want to steal your spotlight though, so not sure if I should 
>> send
>> that or wait for your conversion ;-)
> 
> I see no reasons why should we duplicate some effort. :)  If you're
> already nearing the file-level conversion to its completion, please
> feel free to send it, and we can drop this series. :)

Sorry, I wasn't clear enough.  When I wrote "we can drop this series",
I actually referred to what this series might have turned into, i.e.
into my file-level conversion. :)
diff mbox series

Patch

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);
 		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;
 	}