[PATCH v2 2/2] drm/vkms: Modify memset() in compute_crc function

Mamta Shukla mamtashukla555 at gmail.com
Tue Jan 29 22:00:16 UTC 2019


Replace memset(vaddr_out + src_offset + 24, 0,  8) with
memset(vaddr_out + src_offset + 3, 0, 1) because memset fills
memory in bytes and not in bits.

Signed-off-by: Mamta Shukla <mamtashukla555 at gmail.com>
---
No changes in v2.

 drivers/gpu/drm/vkms/vkms_crc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/vkms/vkms_crc.c b/drivers/gpu/drm/vkms/vkms_crc.c
index dc6cb4c2cced..5135642fb204 100644
--- a/drivers/gpu/drm/vkms/vkms_crc.c
+++ b/drivers/gpu/drm/vkms/vkms_crc.c
@@ -31,7 +31,7 @@ static uint32_t compute_crc(void *vaddr_out, struct vkms_crc_data *crc_out)
 				     + (i * crc_out->pitch)
 				     + (j * crc_out->cpp);
 			/* XRGB format ignores Alpha channel */
-			memset(vaddr_out + src_offset + 24, 0,  8);
+			memset(vaddr_out + src_offset + 3, 0, 1);
 			crc = crc32_le(crc, vaddr_out + src_offset,
 				       sizeof(u32));
 		}
-- 
2.17.1



More information about the dri-devel mailing list