summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2019-09-19 18:49:29 +0300
committerVille Syrjälä <ville.syrjala@linux.intel.com>2019-09-19 19:01:16 +0300
commitb88d9287df800a9753ec1b158be563bd15153516 (patch)
tree459c6dadfe2e3b6d4ebd5d78f56d8c40f71143b9
parent1804eacc85da089644cbfd061ba6319a4dd4ee87 (diff)
downloadxorg-driver-xf86-video-intel-b88d9287df800a9753ec1b158be563bd15153516.tar.gz
sna/fb: Eliminate implicit fallthrough
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@linux.intel.com>
-rw-r--r--src/sna/fb/fb.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/sna/fb/fb.h b/src/sna/fb/fb.h
index 90431747..ee5da97b 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; \