[PATCH xf86-video-intel 07/21] sna/fb: Eliminate implicit fallthrough

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

 



From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>

Duplicate a bit of code in FbDoLeftMaskByteRRop() switch statement
to avoid the fall through.

And while at it sort the cases based on the left byte and length.
Makes the pattern matcher in my brain much happier.

Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx>
---
 src/sna/fb/fb.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/sna/fb/fb.h b/src/sna/fb/fb.h
index 904317478e8a..ee5da97b458c 100644
--- a/src/sna/fb/fb.h
+++ b/src/sna/fb/fb.h
@@ -185,11 +185,13 @@ typedef int FbStride;
 	FbStorePart(dst,sizeof (FbBits) - 3,CARD8,xor); \
 	FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
 	break; \
+    case sizeof (FbBits) - 3: \
+	FbStorePart(dst,sizeof (FbBits) - 3,CARD8,xor); \
+	FbStorePart(dst,sizeof (FbBits) - 2,CARD16,xor); \
+	break; \
     case (sizeof (FbBits) - 2) | (1 << (FB_SHIFT - 3)): \
 	FbStorePart(dst,sizeof (FbBits) - 2,CARD8,xor); \
 	break; \
-    case sizeof (FbBits) - 3: \
-	FbStorePart(dst,sizeof (FbBits) - 3,CARD8,xor); \
     case sizeof (FbBits) - 2: \
 	FbStorePart(dst,sizeof (FbBits) - 2,CARD16,xor); \
 	break; \
-- 
2.21.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux