diff mbox series

drm/rockchip: cdn-dp: Clean up a few logged messages

Message ID 92db74a313547c087cc71059428698c4ec37a9ae.1720048818.git.dsimic@manjaro.org (mailing list archive)
State New
Headers show
Series drm/rockchip: cdn-dp: Clean up a few logged messages | expand

Commit Message

Dragan Simic July 3, 2024, 11:32 p.m. UTC
Clean up a few logged messages, which were previously worded as rather
incomplete sentences separated by periods.  This was both a bit unreadable
and grammatically incorrect, so convert them into partial sentences separated
(or connected) by semicolons, together with some wording improvements.

Signed-off-by: Dragan Simic <dsimic@manjaro.org>
---
 drivers/gpu/drm/rockchip/cdn-dp-core.c | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

Comments

Dragan Simic July 25, 2024, 9:33 a.m. UTC | #1
Hello all,

Just checking, is this patch good enough to be accepted?  If not, is 
there
some other preferred way for cleaning up the produced messages?

On 2024-07-04 01:32, Dragan Simic wrote:
> Clean up a few logged messages, which were previously worded as rather
> incomplete sentences separated by periods.  This was both a bit 
> unreadable
> and grammatically incorrect, so convert them into partial sentences 
> separated
> (or connected) by semicolons, together with some wording improvements.
> 
> Signed-off-by: Dragan Simic <dsimic@manjaro.org>
> ---
>  drivers/gpu/drm/rockchip/cdn-dp-core.c | 16 +++++++---------
>  1 file changed, 7 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c
> b/drivers/gpu/drm/rockchip/cdn-dp-core.c
> index bd7aa891b839..ee9def197095 100644
> --- a/drivers/gpu/drm/rockchip/cdn-dp-core.c
> +++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c
> @@ -969,46 +969,44 @@ static void cdn_dp_pd_event_work(struct 
> work_struct *work)
> 
>  	/* Not connected, notify userspace to disable the block */
>  	if (!cdn_dp_connected_port(dp)) {
> -		DRM_DEV_INFO(dp->dev, "Not connected. Disabling cdn\n");
> +		DRM_DEV_INFO(dp->dev, "Not connected; disabling cdn\n");
>  		dp->connected = false;
> 
>  	/* Connected but not enabled, enable the block */
>  	} else if (!dp->active) {
> -		DRM_DEV_INFO(dp->dev, "Connected, not enabled. Enabling cdn\n");
> +		DRM_DEV_INFO(dp->dev, "Connected, not enabled; enabling cdn\n");
>  		ret = cdn_dp_enable(dp);
>  		if (ret) {
> -			DRM_DEV_ERROR(dp->dev, "Enable dp failed %d\n", ret);
> +			DRM_DEV_ERROR(dp->dev, "Enabling dp failed: %d\n", ret);
>  			dp->connected = false;
>  		}
> 
>  	/* Enabled and connected to a dongle without a sink, notify userspace 
> */
>  	} else if (!cdn_dp_check_sink_connection(dp)) {
> -		DRM_DEV_INFO(dp->dev, "Connected without sink. Assert hpd\n");
> +		DRM_DEV_INFO(dp->dev, "Connected without sink; assert hpd\n");
>  		dp->connected = false;
> 
>  	/* Enabled and connected with a sink, re-train if requested */
>  	} else if (!cdn_dp_check_link_status(dp)) {
>  		unsigned int rate = dp->max_rate;
>  		unsigned int lanes = dp->max_lanes;
>  		struct drm_display_mode *mode = &dp->mode;
> 
> -		DRM_DEV_INFO(dp->dev, "Connected with sink. Re-train link\n");
> +		DRM_DEV_INFO(dp->dev, "Connected with sink; re-train link\n");
>  		ret = cdn_dp_train_link(dp);
>  		if (ret) {
>  			dp->connected = false;
> -			DRM_DEV_ERROR(dp->dev, "Train link failed %d\n", ret);
> +			DRM_DEV_ERROR(dp->dev, "Training link failed: %d\n", ret);
>  			goto out;
>  		}
> 
>  		/* If training result is changed, update the video config */
>  		if (mode->clock &&
>  		    (rate != dp->max_rate || lanes != dp->max_lanes)) {
>  			ret = cdn_dp_config_video(dp);
>  			if (ret) {
>  				dp->connected = false;
> -				DRM_DEV_ERROR(dp->dev,
> -					      "Failed to config video %d\n",
> -					      ret);
> +				DRM_DEV_ERROR(dp->dev, "Failed to configure video: %d\n", ret);
>  			}
>  		}
>  	}
Dragan Simic Aug. 2, 2024, 5:08 p.m. UTC | #2
On 2024-07-25 11:33, Dragan Simic wrote:
> Hello all,
> 
> Just checking, is this patch good enough to be accepted?  If not, is 
> there
> some other preferred way for cleaning up the produced messages?

Just a brief reminder...

> On 2024-07-04 01:32, Dragan Simic wrote:
>> Clean up a few logged messages, which were previously worded as rather
>> incomplete sentences separated by periods.  This was both a bit 
>> unreadable
>> and grammatically incorrect, so convert them into partial sentences 
>> separated
>> (or connected) by semicolons, together with some wording improvements.
>> 
>> Signed-off-by: Dragan Simic <dsimic@manjaro.org>
>> ---
>>  drivers/gpu/drm/rockchip/cdn-dp-core.c | 16 +++++++---------
>>  1 file changed, 7 insertions(+), 9 deletions(-)
>> 
>> diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c
>> b/drivers/gpu/drm/rockchip/cdn-dp-core.c
>> index bd7aa891b839..ee9def197095 100644
>> --- a/drivers/gpu/drm/rockchip/cdn-dp-core.c
>> +++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c
>> @@ -969,46 +969,44 @@ static void cdn_dp_pd_event_work(struct 
>> work_struct *work)
>> 
>>  	/* Not connected, notify userspace to disable the block */
>>  	if (!cdn_dp_connected_port(dp)) {
>> -		DRM_DEV_INFO(dp->dev, "Not connected. Disabling cdn\n");
>> +		DRM_DEV_INFO(dp->dev, "Not connected; disabling cdn\n");
>>  		dp->connected = false;
>> 
>>  	/* Connected but not enabled, enable the block */
>>  	} else if (!dp->active) {
>> -		DRM_DEV_INFO(dp->dev, "Connected, not enabled. Enabling cdn\n");
>> +		DRM_DEV_INFO(dp->dev, "Connected, not enabled; enabling cdn\n");
>>  		ret = cdn_dp_enable(dp);
>>  		if (ret) {
>> -			DRM_DEV_ERROR(dp->dev, "Enable dp failed %d\n", ret);
>> +			DRM_DEV_ERROR(dp->dev, "Enabling dp failed: %d\n", ret);
>>  			dp->connected = false;
>>  		}
>> 
>>  	/* Enabled and connected to a dongle without a sink, notify 
>> userspace */
>>  	} else if (!cdn_dp_check_sink_connection(dp)) {
>> -		DRM_DEV_INFO(dp->dev, "Connected without sink. Assert hpd\n");
>> +		DRM_DEV_INFO(dp->dev, "Connected without sink; assert hpd\n");
>>  		dp->connected = false;
>> 
>>  	/* Enabled and connected with a sink, re-train if requested */
>>  	} else if (!cdn_dp_check_link_status(dp)) {
>>  		unsigned int rate = dp->max_rate;
>>  		unsigned int lanes = dp->max_lanes;
>>  		struct drm_display_mode *mode = &dp->mode;
>> 
>> -		DRM_DEV_INFO(dp->dev, "Connected with sink. Re-train link\n");
>> +		DRM_DEV_INFO(dp->dev, "Connected with sink; re-train link\n");
>>  		ret = cdn_dp_train_link(dp);
>>  		if (ret) {
>>  			dp->connected = false;
>> -			DRM_DEV_ERROR(dp->dev, "Train link failed %d\n", ret);
>> +			DRM_DEV_ERROR(dp->dev, "Training link failed: %d\n", ret);
>>  			goto out;
>>  		}
>> 
>>  		/* If training result is changed, update the video config */
>>  		if (mode->clock &&
>>  		    (rate != dp->max_rate || lanes != dp->max_lanes)) {
>>  			ret = cdn_dp_config_video(dp);
>>  			if (ret) {
>>  				dp->connected = false;
>> -				DRM_DEV_ERROR(dp->dev,
>> -					      "Failed to config video %d\n",
>> -					      ret);
>> +				DRM_DEV_ERROR(dp->dev, "Failed to configure video: %d\n", ret);
>>  			}
>>  		}
>>  	}
Andy Yan Aug. 5, 2024, 7:40 a.m. UTC | #3
Hello Dragan,

At 2024-07-04 07:32:20, "Dragan Simic" <dsimic@manjaro.org> wrote:
>Clean up a few logged messages, which were previously worded as rather
>incomplete sentences separated by periods.  This was both a bit unreadable
>and grammatically incorrect, so convert them into partial sentences separated
>(or connected) by semicolons, together with some wording improvements.
>
>Signed-off-by: Dragan Simic <dsimic@manjaro.org>

 Reviewed-by: Andy Yan <andyshrk@163.com>


>---
> drivers/gpu/drm/rockchip/cdn-dp-core.c | 16 +++++++---------
> 1 file changed, 7 insertions(+), 9 deletions(-)
>
>diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp-core.c
>index bd7aa891b839..ee9def197095 100644
>--- a/drivers/gpu/drm/rockchip/cdn-dp-core.c
>+++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c
>@@ -969,46 +969,44 @@ static void cdn_dp_pd_event_work(struct work_struct *work)
> 
> 	/* Not connected, notify userspace to disable the block */
> 	if (!cdn_dp_connected_port(dp)) {
>-		DRM_DEV_INFO(dp->dev, "Not connected. Disabling cdn\n");
>+		DRM_DEV_INFO(dp->dev, "Not connected; disabling cdn\n");
> 		dp->connected = false;
> 
> 	/* Connected but not enabled, enable the block */
> 	} else if (!dp->active) {
>-		DRM_DEV_INFO(dp->dev, "Connected, not enabled. Enabling cdn\n");
>+		DRM_DEV_INFO(dp->dev, "Connected, not enabled; enabling cdn\n");
> 		ret = cdn_dp_enable(dp);
> 		if (ret) {
>-			DRM_DEV_ERROR(dp->dev, "Enable dp failed %d\n", ret);
>+			DRM_DEV_ERROR(dp->dev, "Enabling dp failed: %d\n", ret);
> 			dp->connected = false;
> 		}
> 
> 	/* Enabled and connected to a dongle without a sink, notify userspace */
> 	} else if (!cdn_dp_check_sink_connection(dp)) {
>-		DRM_DEV_INFO(dp->dev, "Connected without sink. Assert hpd\n");
>+		DRM_DEV_INFO(dp->dev, "Connected without sink; assert hpd\n");
> 		dp->connected = false;
> 
> 	/* Enabled and connected with a sink, re-train if requested */
> 	} else if (!cdn_dp_check_link_status(dp)) {
> 		unsigned int rate = dp->max_rate;
> 		unsigned int lanes = dp->max_lanes;
> 		struct drm_display_mode *mode = &dp->mode;
> 
>-		DRM_DEV_INFO(dp->dev, "Connected with sink. Re-train link\n");
>+		DRM_DEV_INFO(dp->dev, "Connected with sink; re-train link\n");
> 		ret = cdn_dp_train_link(dp);
> 		if (ret) {
> 			dp->connected = false;
>-			DRM_DEV_ERROR(dp->dev, "Train link failed %d\n", ret);
>+			DRM_DEV_ERROR(dp->dev, "Training link failed: %d\n", ret);
> 			goto out;
> 		}
> 
> 		/* If training result is changed, update the video config */
> 		if (mode->clock &&
> 		    (rate != dp->max_rate || lanes != dp->max_lanes)) {
> 			ret = cdn_dp_config_video(dp);
> 			if (ret) {
> 				dp->connected = false;
>-				DRM_DEV_ERROR(dp->dev,
>-					      "Failed to config video %d\n",
>-					      ret);
>+				DRM_DEV_ERROR(dp->dev, "Failed to configure video: %d\n", ret);
> 			}
> 		}
> 	}
Heiko Stuebner Aug. 15, 2024, 10:40 a.m. UTC | #4
On Thu, 4 Jul 2024 01:32:20 +0200, Dragan Simic wrote:
> Clean up a few logged messages, which were previously worded as rather
> incomplete sentences separated by periods.  This was both a bit unreadable
> and grammatically incorrect, so convert them into partial sentences separated
> (or connected) by semicolons, together with some wording improvements.
> 
> 

Applied, thanks!

[1/1] drm/rockchip: cdn-dp: Clean up a few logged messages
      commit: f7f4df8851194d2635fb7989582014329dcffa12

Best regards,
diff mbox series

Patch

diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp-core.c
index bd7aa891b839..ee9def197095 100644
--- a/drivers/gpu/drm/rockchip/cdn-dp-core.c
+++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c
@@ -969,46 +969,44 @@  static void cdn_dp_pd_event_work(struct work_struct *work)
 
 	/* Not connected, notify userspace to disable the block */
 	if (!cdn_dp_connected_port(dp)) {
-		DRM_DEV_INFO(dp->dev, "Not connected. Disabling cdn\n");
+		DRM_DEV_INFO(dp->dev, "Not connected; disabling cdn\n");
 		dp->connected = false;
 
 	/* Connected but not enabled, enable the block */
 	} else if (!dp->active) {
-		DRM_DEV_INFO(dp->dev, "Connected, not enabled. Enabling cdn\n");
+		DRM_DEV_INFO(dp->dev, "Connected, not enabled; enabling cdn\n");
 		ret = cdn_dp_enable(dp);
 		if (ret) {
-			DRM_DEV_ERROR(dp->dev, "Enable dp failed %d\n", ret);
+			DRM_DEV_ERROR(dp->dev, "Enabling dp failed: %d\n", ret);
 			dp->connected = false;
 		}
 
 	/* Enabled and connected to a dongle without a sink, notify userspace */
 	} else if (!cdn_dp_check_sink_connection(dp)) {
-		DRM_DEV_INFO(dp->dev, "Connected without sink. Assert hpd\n");
+		DRM_DEV_INFO(dp->dev, "Connected without sink; assert hpd\n");
 		dp->connected = false;
 
 	/* Enabled and connected with a sink, re-train if requested */
 	} else if (!cdn_dp_check_link_status(dp)) {
 		unsigned int rate = dp->max_rate;
 		unsigned int lanes = dp->max_lanes;
 		struct drm_display_mode *mode = &dp->mode;
 
-		DRM_DEV_INFO(dp->dev, "Connected with sink. Re-train link\n");
+		DRM_DEV_INFO(dp->dev, "Connected with sink; re-train link\n");
 		ret = cdn_dp_train_link(dp);
 		if (ret) {
 			dp->connected = false;
-			DRM_DEV_ERROR(dp->dev, "Train link failed %d\n", ret);
+			DRM_DEV_ERROR(dp->dev, "Training link failed: %d\n", ret);
 			goto out;
 		}
 
 		/* If training result is changed, update the video config */
 		if (mode->clock &&
 		    (rate != dp->max_rate || lanes != dp->max_lanes)) {
 			ret = cdn_dp_config_video(dp);
 			if (ret) {
 				dp->connected = false;
-				DRM_DEV_ERROR(dp->dev,
-					      "Failed to config video %d\n",
-					      ret);
+				DRM_DEV_ERROR(dp->dev, "Failed to configure video: %d\n", ret);
 			}
 		}
 	}