diff mbox series

drm/i915/display: Drop redundant debug print

Message ID 20210726185156.27183-1-swati2.sharma@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/display: Drop redundant debug print | expand

Commit Message

Sharma, Swati2 July 26, 2021, 6:51 p.m. UTC
drm_dp_dpcd_read/write already has debug error message.
Drop redundant error messages which gives false
status even if correct value is read in drm_dp_dpcd_read().

Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

Comments

kernel test robot July 27, 2021, 12:07 a.m. UTC | #1
Hi Swati,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on drm-tip/drm-tip v5.14-rc3 next-20210726]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Swati-Sharma/drm-i915-display-Drop-redundant-debug-print/20210727-024330
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-randconfig-a013-20210727 (attached as .config)
compiler: gcc-10 (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0
reproduce (this is a W=1 build):
        # https://github.com/0day-ci/linux/commit/acb6cc54386ff61ebce42832ee7fe1d68bb82141
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Swati-Sharma/drm-i915-display-Drop-redundant-debug-print/20210727-024330
        git checkout acb6cc54386ff61ebce42832ee7fe1d68bb82141
        # save the attached .config to linux build tree
        make W=1 ARCH=x86_64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/gpu/drm/i915/display/intel_dp.c: In function 'intel_dp_check_link_service_irq':
>> drivers/gpu/drm/i915/display/intel_dp.c:3867:27: error: unused variable 'i915' [-Werror=unused-variable]
    3867 |  struct drm_i915_private *i915 = dp_to_i915(intel_dp);
         |                           ^~~~
   cc1: all warnings being treated as errors


vim +/i915 +3867 drivers/gpu/drm/i915/display/intel_dp.c

9844bc87cb7a59 drivers/gpu/drm/i915/intel_dp.c         Dhinakaran Pandiyan 2018-09-27  3864  
9488a030ac9144 drivers/gpu/drm/i915/display/intel_dp.c Swati Sharma        2020-12-18  3865  static void intel_dp_check_link_service_irq(struct intel_dp *intel_dp)
9488a030ac9144 drivers/gpu/drm/i915/display/intel_dp.c Swati Sharma        2020-12-18  3866  {
9488a030ac9144 drivers/gpu/drm/i915/display/intel_dp.c Swati Sharma        2020-12-18 @3867  	struct drm_i915_private *i915 = dp_to_i915(intel_dp);
9488a030ac9144 drivers/gpu/drm/i915/display/intel_dp.c Swati Sharma        2020-12-18  3868  	u8 val;
9488a030ac9144 drivers/gpu/drm/i915/display/intel_dp.c Swati Sharma        2020-12-18  3869  
9488a030ac9144 drivers/gpu/drm/i915/display/intel_dp.c Swati Sharma        2020-12-18  3870  	if (intel_dp->dpcd[DP_DPCD_REV] < 0x11)
9488a030ac9144 drivers/gpu/drm/i915/display/intel_dp.c Swati Sharma        2020-12-18  3871  		return;
9488a030ac9144 drivers/gpu/drm/i915/display/intel_dp.c Swati Sharma        2020-12-18  3872  
9488a030ac9144 drivers/gpu/drm/i915/display/intel_dp.c Swati Sharma        2020-12-18  3873  	if (drm_dp_dpcd_readb(&intel_dp->aux,
acb6cc54386ff6 drivers/gpu/drm/i915/display/intel_dp.c Swati Sharma        2021-07-27  3874  			      DP_LINK_SERVICE_IRQ_VECTOR_ESI0, &val) != 1 || !val)
9488a030ac9144 drivers/gpu/drm/i915/display/intel_dp.c Swati Sharma        2020-12-18  3875  		return;
9488a030ac9144 drivers/gpu/drm/i915/display/intel_dp.c Swati Sharma        2020-12-18  3876  
9488a030ac9144 drivers/gpu/drm/i915/display/intel_dp.c Swati Sharma        2020-12-18  3877  	if (drm_dp_dpcd_writeb(&intel_dp->aux,
acb6cc54386ff6 drivers/gpu/drm/i915/display/intel_dp.c Swati Sharma        2021-07-27  3878  			       DP_LINK_SERVICE_IRQ_VECTOR_ESI0, val) != 1)
9488a030ac9144 drivers/gpu/drm/i915/display/intel_dp.c Swati Sharma        2020-12-18  3879  		return;
9488a030ac9144 drivers/gpu/drm/i915/display/intel_dp.c Swati Sharma        2020-12-18  3880  
9488a030ac9144 drivers/gpu/drm/i915/display/intel_dp.c Swati Sharma        2020-12-18  3881  	if (val & HDMI_LINK_STATUS_CHANGED)
9488a030ac9144 drivers/gpu/drm/i915/display/intel_dp.c Swati Sharma        2020-12-18  3882  		intel_dp_handle_hdmi_link_status_change(intel_dp);
9488a030ac9144 drivers/gpu/drm/i915/display/intel_dp.c Swati Sharma        2020-12-18  3883  }
9488a030ac9144 drivers/gpu/drm/i915/display/intel_dp.c Swati Sharma        2020-12-18  3884  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Nautiyal, Ankit K Aug. 12, 2021, 5:47 a.m. UTC | #2
Patch looks good to me.

I think we must add fixes tag with the below commit:

https://cgit.freedesktop.org/drm-tip/commit/?id=9488a030ac91447ea186ca3b7ec5c72ff03bc202

Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>

On 7/27/2021 12:21 AM, Swati Sharma wrote:
> drm_dp_dpcd_read/write already has debug error message.
> Drop redundant error messages which gives false
> status even if correct value is read in drm_dp_dpcd_read().
>
> Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
> ---
>   drivers/gpu/drm/i915/display/intel_dp.c | 8 ++------
>   1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index c386ef8eb200..5c84f51ad41d 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -3871,16 +3871,12 @@ static void intel_dp_check_link_service_irq(struct intel_dp *intel_dp)
>   		return;
>   
>   	if (drm_dp_dpcd_readb(&intel_dp->aux,
> -			      DP_LINK_SERVICE_IRQ_VECTOR_ESI0, &val) != 1 || !val) {
> -		drm_dbg_kms(&i915->drm, "Error in reading link service irq vector\n");
> +			      DP_LINK_SERVICE_IRQ_VECTOR_ESI0, &val) != 1 || !val)
>   		return;
> -	}
>   
>   	if (drm_dp_dpcd_writeb(&intel_dp->aux,
> -			       DP_LINK_SERVICE_IRQ_VECTOR_ESI0, val) != 1) {
> -		drm_dbg_kms(&i915->drm, "Error in writing link service irq vector\n");
> +			       DP_LINK_SERVICE_IRQ_VECTOR_ESI0, val) != 1)
>   		return;
> -	}
>   
>   	if (val & HDMI_LINK_STATUS_CHANGED)
>   		intel_dp_handle_hdmi_link_status_change(intel_dp);
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index c386ef8eb200..5c84f51ad41d 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -3871,16 +3871,12 @@  static void intel_dp_check_link_service_irq(struct intel_dp *intel_dp)
 		return;
 
 	if (drm_dp_dpcd_readb(&intel_dp->aux,
-			      DP_LINK_SERVICE_IRQ_VECTOR_ESI0, &val) != 1 || !val) {
-		drm_dbg_kms(&i915->drm, "Error in reading link service irq vector\n");
+			      DP_LINK_SERVICE_IRQ_VECTOR_ESI0, &val) != 1 || !val)
 		return;
-	}
 
 	if (drm_dp_dpcd_writeb(&intel_dp->aux,
-			       DP_LINK_SERVICE_IRQ_VECTOR_ESI0, val) != 1) {
-		drm_dbg_kms(&i915->drm, "Error in writing link service irq vector\n");
+			       DP_LINK_SERVICE_IRQ_VECTOR_ESI0, val) != 1)
 		return;
-	}
 
 	if (val & HDMI_LINK_STATUS_CHANGED)
 		intel_dp_handle_hdmi_link_status_change(intel_dp);