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

Sharma, Shashank shashank.sharma at intel.com
Mon Sep 4 09:14:14 UTC 2017


Regards
Shashank
On 9/1/2017 8:14 PM, Thierry Reding wrote:
> From: Thierry Reding <treding at nvidia.com>
>
> 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.
>
> Signed-off-by: Thierry Reding <treding at nvidia.com>
> ---
>   drivers/gpu/drm/drm_scdc_helper.c | 10 +++++-----
>   1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_scdc_helper.c b/drivers/gpu/drm/drm_scdc_helper.c
> index d66c436a829e..5e6f0709df49 100644
> --- a/drivers/gpu/drm/drm_scdc_helper.c
> +++ b/drivers/gpu/drm/drm_scdc_helper.c
> @@ -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;
>   	}
>   
Reviewed-by: Shashank Sharma <shashank.sharma at intel.com>


More information about the dri-devel mailing list