Skip to contentSkip to conversation

drm/scdc-helper: Remove gratuitous blank lines

PATCH In review Thierry Reding 3 participants 8 messages Sep 1, 2017 – Sep 4, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 drm/scdc-helper: Remove gratuitous blank lines

From: Thierry Reding <[email protected]>

It's unusual to separate kerneldoc comments from the functions that they describe by a blank line. Remove them.

---
 drivers/gpu/drm/drm_scdc_helper.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/drm_scdc_helper.c +0 -2
index 935653eb3616..d66c436a829e 100644
@@ -134,7 +134,6 @@ EXPORT_SYMBOL(drm_scdc_write);
  * Returns:
  * True if the scrambling is enabled, false otherwise.
  */
-
 bool drm_scdc_get_scrambling_status(struct i2c_adapter *adapter)
 {
 	u8 status;
@@ -162,7 +161,6 @@ EXPORT_SYMBOL(drm_scdc_get_scrambling_status);
  * Returns:
  * True if scrambling is set/reset successfully, false otherwise.
  */
-
 bool drm_scdc_set_scrambling(struct i2c_adapter *adapter, bool enable)
 {
 	u8 config;
Signature · 6 lines
2.13.3

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw

PATCH 2/3 drm/scdc-helper: Use consistent error reporting

From: Thierry Reding <[email protected]>

The error messages generated by the SCDC helpers are somewhat inconsistent with other DRM errors and even with other errors in the same file. Fix them all up to use a common format.

---
 drivers/gpu/drm/drm_scdc_helper.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/drm_scdc_helper.c +5 -5
index d66c436a829e..5e6f0709df49 100644
@@ -141,7 +141,7 @@ bool drm_scdc_get_scrambling_status(struct i2c_adapter *adapter)
 
 	ret = drm_scdc_readb(adapter, SCDC_SCRAMBLER_STATUS, &status);
 	if (ret < 0) {
-		DRM_ERROR("Failed to read scrambling status, error %d\n", ret);
+		DRM_ERROR("Failed to read scrambling status: %d\n", ret);
 		return false;
 	}
 
@@ -168,7 +168,7 @@ bool drm_scdc_set_scrambling(struct i2c_adapter *adapter, bool enable)
 
 	ret = drm_scdc_readb(adapter, SCDC_TMDS_CONFIG, &config);
 	if (ret < 0) {
-		DRM_ERROR("Failed to read tmds config, err=%d\n", ret);
+		DRM_ERROR("Failed to read tmds config: %d\n", ret);
 		return false;
 	}
 
@@ -179,7 +179,7 @@ bool drm_scdc_set_scrambling(struct i2c_adapter *adapter, bool enable)
 
 	ret = drm_scdc_writeb(adapter, SCDC_TMDS_CONFIG, config);
 	if (ret < 0) {
-		DRM_ERROR("Failed to enable scrambling, error %d\n", ret);
+		DRM_ERROR("Failed to enable scrambling: %d\n", ret);
 		return false;
 	}
 
@@ -223,7 +223,7 @@ bool drm_scdc_set_high_tmds_clock_ratio(struct i2c_adapter *adapter, bool set)
 
 	ret = drm_scdc_readb(adapter, SCDC_TMDS_CONFIG, &config);
 	if (ret < 0) {
-		DRM_ERROR("Failed to read tmds config, err=%d\n", ret);
+		DRM_ERROR("Failed to read tmds config: %d\n", ret);
 		return false;
 	}
 
@@ -234,7 +234,7 @@ bool drm_scdc_set_high_tmds_clock_ratio(struct i2c_adapter *adapter, bool set)
 
 	ret = drm_scdc_writeb(adapter, SCDC_TMDS_CONFIG, config);
 	if (ret < 0) {
-		DRM_ERROR("Failed to set TMDS clock ratio, error %d\n", ret);
+		DRM_ERROR("Failed to set TMDS clock ratio: %d\n", ret);
 		return false;
 	}
 
Signature · 6 lines
2.13.3

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 2/3
#2 lore raw

Re: [PATCH 2/3] drm/scdc-helper: Use consistent error reporting

Regards
Shashank

Quoted 52 lines · Thierry Reding

From: Thierry Reding <[email protected]>

The error messages generated by the SCDC helpers are somewhat inconsistent with other DRM errors and even with other errors in the same file. Fix them all up to use a common format.

---
  drivers/gpu/drm/drm_scdc_helper.c | 10 +++++-----
  1 file changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/drm_scdc_helper.c +4 -4
index d66c436a829e..5e6f0709df49 100644
@@ -141,7 +141,7 @@ bool drm_scdc_get_scrambling_status(struct i2c_adapter *adapter)
 
  	ret = drm_scdc_readb(adapter, SCDC_SCRAMBLER_STATUS, &status);
  	if (ret < 0) {
-		DRM_ERROR("Failed to read scrambling status, error %d\n", ret);
+		DRM_ERROR("Failed to read scrambling status: %d\n", ret);
  		return false;
  	}
 
@@ -168,7 +168,7 @@ bool drm_scdc_set_scrambling(struct i2c_adapter *adapter, bool enable)
 
  	ret = drm_scdc_readb(adapter, SCDC_TMDS_CONFIG, &config);
  	if (ret < 0) {
-		DRM_ERROR("Failed to read tmds config, err=%d\n", ret);
+		DRM_ERROR("Failed to read tmds config: %d\n", ret);
  		return false;
  	}
 
@@ -179,7 +179,7 @@ bool drm_scdc_set_scrambling(struct i2c_adapter *adapter, bool enable)
 
  	ret = drm_scdc_writeb(adapter, SCDC_TMDS_CONFIG, config);
  	if (ret < 0) {
-		DRM_ERROR("Failed to enable scrambling, error %d\n", ret);
+		DRM_ERROR("Failed to enable scrambling: %d\n", ret);
  		return false;
  	}
 
@@ -223,7 +223,7 @@ bool drm_scdc_set_high_tmds_clock_ratio(struct i2c_adapter *adapter, bool set)
 
  	ret = drm_scdc_readb(adapter, SCDC_TMDS_CONFIG, &config);
  	if (ret < 0) {
-		DRM_ERROR("Failed to read tmds config, err=%d\n", ret);
+		DRM_ERROR("Failed to read tmds config: %d\n", ret);
  		return false;
  	}
 

drivers/gpu/drm/drm_scdc_helper.c bool drm_scdc_set_high_tmds_clock_ratio(struct i2c_adapter *adapter, bool set) · line 240

Quoted 8 lines
drivers/gpu/drm/drm_scdc_helper.c +1 -1
@@ -234,7 +234,7 @@ bool drm_scdc_set_high_tmds_clock_ratio(struct i2c_adapter *adapter, bool set)
 
  	ret = drm_scdc_writeb(adapter, SCDC_TMDS_CONFIG, config);
  	if (ret < 0) {
-		DRM_ERROR("Failed to set TMDS clock ratio, error %d\n", ret);
+		DRM_ERROR("Failed to set TMDS clock ratio: %d\n", ret);
  		return false;
  	}
 

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw

PATCH 3/3 drm/scdc-helper: Use consistent spelling for TMDS

In reply to Thierry Reding

From: Thierry Reding <[email protected]>

The file uses inconsistent capitalization for TMDS. Since it is an abbreviation, all uppercase is correct.

---
 drivers/gpu/drm/drm_scdc_helper.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_scdc_helper.c +2 -2
index 5e6f0709df49..657ea5ab6c3f 100644
@@ -168,7 +168,7 @@ bool drm_scdc_set_scrambling(struct i2c_adapter *adapter, bool enable)
 
 	ret = drm_scdc_readb(adapter, SCDC_TMDS_CONFIG, &config);
 	if (ret < 0) {
-		DRM_ERROR("Failed to read tmds config: %d\n", ret);
+		DRM_ERROR("Failed to read TMDS config: %d\n", ret);
 		return false;
 	}
 
@@ -223,7 +223,7 @@ bool drm_scdc_set_high_tmds_clock_ratio(struct i2c_adapter *adapter, bool set)
 
 	ret = drm_scdc_readb(adapter, SCDC_TMDS_CONFIG, &config);
 	if (ret < 0) {
-		DRM_ERROR("Failed to read tmds config: %d\n", ret);
+		DRM_ERROR("Failed to read TMDS config: %d\n", ret);
 		return false;
 	}
 
Signature · 6 lines
2.13.3

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 3/3
#4 lore raw

Re: [PATCH 3/3] drm/scdc-helper: Use consistent spelling for TMDS

Regards
Shashank

Quoted 24 lines · Thierry Reding

From: Thierry Reding <[email protected]>

The file uses inconsistent capitalization for TMDS. Since it is an abbreviation, all uppercase is correct.

---
  drivers/gpu/drm/drm_scdc_helper.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/drm_scdc_helper.c +1 -1
index 5e6f0709df49..657ea5ab6c3f 100644
@@ -168,7 +168,7 @@ bool drm_scdc_set_scrambling(struct i2c_adapter *adapter, bool enable)
 
  	ret = drm_scdc_readb(adapter, SCDC_TMDS_CONFIG, &config);
  	if (ret < 0) {
-		DRM_ERROR("Failed to read tmds config: %d\n", ret);
+		DRM_ERROR("Failed to read TMDS config: %d\n", ret);
  		return false;
  	}
 

drivers/gpu/drm/drm_scdc_helper.c bool drm_scdc_set_high_tmds_clock_ratio(struct i2c_adapter *adapter, bool set) · line 229

Quoted 8 lines
drivers/gpu/drm/drm_scdc_helper.c +1 -1
@@ -223,7 +223,7 @@ bool drm_scdc_set_high_tmds_clock_ratio(struct i2c_adapter *adapter, bool set)
 
  	ret = drm_scdc_readb(adapter, SCDC_TMDS_CONFIG, &config);
  	if (ret < 0) {
-		DRM_ERROR("Failed to read tmds config: %d\n", ret);
+		DRM_ERROR("Failed to read TMDS config: %d\n", ret);
  		return false;
  	}
 

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reviewed-by on v1 1/3
#5 lore raw
In reply to Thierry Reding
Quoted 6 lines · Thierry Reding

From: Thierry Reding <[email protected]>

It's unusual to separate kerneldoc comments from the functions that they describe by a blank line. Remove them.

Series lgtm

Quoted 31 lines
---
 drivers/gpu/drm/drm_scdc_helper.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/drm_scdc_helper.c +0 -2
index 935653eb3616..d66c436a829e 100644
@@ -134,7 +134,6 @@ EXPORT_SYMBOL(drm_scdc_write);
  * Returns:
  * True if the scrambling is enabled, false otherwise.
  */
-
 bool drm_scdc_get_scrambling_status(struct i2c_adapter *adapter)
 {
 	u8 status;
@@ -162,7 +161,6 @@ EXPORT_SYMBOL(drm_scdc_get_scrambling_status);
  * Returns:
  * True if scrambling is set/reset successfully, false otherwise.
  */
-
 bool drm_scdc_set_scrambling(struct i2c_adapter *adapter, bool enable)
 {
 	u8 config;
Signature · 6 lines
2.13.3

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
author Applied
#6 lore raw
Quoted 10 lines · Ville Syrjälä
Quoted 6 lines · Thierry Reding

From: Thierry Reding <[email protected]>

It's unusual to separate kerneldoc comments from the functions that they describe by a blank line. Remove them.

Series lgtm

Applied to drm-misc-next, thanks.

Thierry

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reviewed-by on v1 1/3
#7 lore raw
In reply to Thierry Reding

Regards

Shashank

Quoted 23 lines · Thierry Reding

From: Thierry Reding <[email protected]>

It's unusual to separate kerneldoc comments from the functions that they describe by a blank line. Remove them.

---
  drivers/gpu/drm/drm_scdc_helper.c | 2 --
  1 file changed, 2 deletions(-)
drivers/gpu/drm/drm_scdc_helper.c +0 -1
index 935653eb3616..d66c436a829e 100644
@@ -134,7 +134,6 @@ EXPORT_SYMBOL(drm_scdc_write);
   * Returns:
   * True if the scrambling is enabled, false otherwise.
   */
-
  bool drm_scdc_get_scrambling_status(struct i2c_adapter *adapter)
  {
  	u8 status;

drivers/gpu/drm/drm_scdc_helper.c EXPORT_SYMBOL(drm_scdc_get_scrambling_status); · line 166

Quoted 7 lines
drivers/gpu/drm/drm_scdc_helper.c +0 -1
@@ -162,7 +161,6 @@ EXPORT_SYMBOL(drm_scdc_get_scrambling_status);
   * Returns:
   * True if scrambling is set/reset successfully, false otherwise.
   */
-
  bool drm_scdc_set_scrambling(struct i2c_adapter *adapter, bool enable)
  {
  	u8 config;

Thanks for the fix

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel