Skip to contentSkip to conversation

drm/vmwgfx: fix missing assignment to ts

PATCH In review Colin Ian King 3 participants 3 messages Jun 23, 2025 – Jun 24, 2025

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/vmwgfx: fix missing assignment to ts

The assignment to ts is missing on the call to ktime_to_timespec64. Fix this by adding the missing assignment.

Fixes db6a94b26354 ("drm/vmwgfx: Implement dma_fence_ops properly")
---
 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/vmwgfx/vmwgfx_fence.c +1 -1
index c2294abbe753..00be92da5509 100644
@@ -538,7 +538,7 @@ static void vmw_event_fence_action_seq_passed(struct dma_fence *f,
 	if (likely(eaction->tv_sec != NULL)) {
 		struct timespec64 ts;
 
-		ktime_to_timespec64(f->timestamp);
+		ts = ktime_to_timespec64(f->timestamp);
 		/* monotonic time, so no y2038 overflow */
 		*eaction->tv_sec = ts.tv_sec;
 		*eaction->tv_usec = ts.tv_nsec / NSEC_PER_USEC;
Signature · 1 line
2.50.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Colin Ian King

The assignment to ts is missing on the call to ktime_to_timespec64. Fix this by adding the missing assignment.

Fixes db6a94b26354 ("drm/vmwgfx: Implement dma_fence_ops properly")

Was this caught by a compiler warning? I'm surprised I didn't get some sort of warning for this.

#2 lore raw
Quoted 11 lines · Ian Forbes
Quoted 6 lines · Colin Ian King

The assignment to ts is missing on the call to ktime_to_timespec64. Fix this by adding the missing assignment.

Fixes db6a94b26354 ("drm/vmwgfx: Implement dma_fence_ops properly")

Was this caught by a compiler warning? I'm surprised I didn't get some sort of warning for this.

We've disabled uninitialized variable warnings in GCC. Perhaps Clang would have caught this but I'm not sure because tracking uninitialized struct members is a bit more complicated than tracking uninitialized variables.

regards,
dan carpenter