[bug report] drm: revocation check at drm subsystem

Dan Carpenter dan.carpenter at oracle.com
Tue Feb 11 14:49:34 UTC 2020


Hello Ramalingam C,

The patch 6498bf5800a3: "drm: revocation check at drm subsystem" from
May 7, 2019, leads to the following static checker warning:

	drivers/gpu/drm/drm_hdcp.c:195 drm_hdcp_parse_hdcp2_srm()
	warn: mask and shift to zero

drivers/gpu/drm/drm_hdcp.c
   190                  DRM_ERROR("No vrl found\n");
   191                  return -EINVAL;
   192          }
   193  
   194          buf += DRM_HDCP_2_VRL_LENGTH_SIZE;
   195          ksv_count = (*buf << 2) | DRM_HDCP_2_KSV_COUNT_2_LSBITS(*(buf + 1));
                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This macro is always zero.

   196          if (!ksv_count) {
   197                  DRM_DEBUG("Revoked KSV count is 0\n");
   198                  return count;
   199          }
   200  

The define is:

#define DRM_HDCP_2_KSV_COUNT_2_LSBITS(byte)     (((byte) & 0xC) >> 6)

0xC >> 6 is always zero.

regards,
dan carpenter


More information about the dri-devel mailing list