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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
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

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux