aboutsummaryrefslogtreecommitdiff
path: root/src/lib/jpeg.c
diff options
context:
space:
mode:
authorLee Leahy <leroy.p.leahy@intel.com>2017-03-09 17:35:28 -0800
committerMartin Roth <martinroth@google.com>2017-03-13 17:16:08 +0100
commit35af5c47b030c0a1837cb34bc9ae4d50734fefb0 (patch)
tree0e0f1d541d170095fe22739d38a7f02d77c4329e /src/lib/jpeg.c
parentfece39baa5ce730d8467454e5ce407c0bc45cb78 (diff)
src/lib: Fix spacing
Fix the following errors and warnings detected by checkpatch.pl: ERROR: spaces required around that '?' (ctx:WxV) ERROR: spaces required around that '=' (ctx:VxV) ERROR: spaces required around that '<' (ctx:VxV) ERROR: spaces required around that '+=' (ctx:VxV) ERROR: space required after that ',' (ctx:VxV) ERROR: space required before the open brace '{' ERROR: space required after that close brace '}' ERROR: need consistent spacing around '+' (ctx:WxV) ERROR: need consistent spacing around '*' (ctx:WxV) ERROR: need consistent spacing around '&' (ctx:VxW) ERROR: spaces required around that '?' (ctx:VxW) ERROR: spaces required around that ':' (ctx:VxW) ERROR: trailing whitespace ERROR: space prohibited before that '++' (ctx:WxO) ERROR: space prohibited before that ',' (ctx:WxW) ERROR: space prohibited after that '!' (ctx:BxW) ERROR: spaces prohibited around that '->' (ctx:VxW) ERROR: space prohibited after that '-' (ctx:WxW) WARNING: space prohibited before semicolon WARNING: unnecessary whitespace before a quoted newline WARNING: missing space after return type Note that lib/libgcov.c and lib/lzmadecode.c are providing false positives for ERROR: need consistent spacing around '*' (ctx:WxV) An example is: void __gcov_merge_add(gcov_type *counters __attribute__ ((unused)), unsigned int n_counters __attribute__ ((unused))) {} TEST=Build and run on Galileo Gen2 Change-Id: I0016327a5754018eaeb25bedf42338291632c7c1 Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com> Reviewed-on: https://review.coreboot.org/18733 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src/lib/jpeg.c')
-rw-r--r--src/lib/jpeg.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/lib/jpeg.c b/src/lib/jpeg.c
index 751ef0e624..7fb151d9b8 100644
--- a/src/lib/jpeg.c
+++ b/src/lib/jpeg.c
@@ -600,10 +600,10 @@ static void dec_makehuff(struct dec_hufftbl *hu, int *hufflen, unsigned char *hu
i);
if (v && x < (1 << (v - 1)))
x += (-1 << v) + 1;
- x = x << 16 | (hu-> vals[k] & 0xf0) << 4 |
+ x = x << 16 | (hu->vals[k] & 0xf0) << 4 |
(DECBITS - (i + 1 + v)) | 128;
} else
- x = v << 16 | (hu-> vals[k] & 0xf0) << 4 |
+ x = v << 16 | (hu->vals[k] & 0xf0) << 4 |
(DECBITS - (i + 1));
hu->llvals[c | d] = x;
}
@@ -633,11 +633,11 @@ static void dec_makehuff(struct dec_hufftbl *hu, int *hufflen, unsigned char *hu
#define C5IC1 ((PREC)IFIX(0.566454497)) /* c5/c1 */
#define C7IC1 ((PREC)IFIX(0.198912367)) /* c7/c1 */
-#define XPP(a,b) (t = a + b, b = a - b, a = t)
-#define XMP(a,b) (t = a - b, b = a + b, a = t)
-#define XPM(a,b) (t = a + b, b = b - a, a = t)
+#define XPP(a, b) (t = a + b, b = a - b, a = t)
+#define XMP(a, b) (t = a - b, b = a + b, a = t)
+#define XPM(a, b) (t = a + b, b = b - a, a = t)
-#define ROT(a,b,s,c) (t = IMULT(a + b, s), \
+#define ROT(a, b, s, c) (t = IMULT(a + b, s), \
a = IMULT(a, c - s) + t, \
b = IMULT(b, c + s) - t)
@@ -810,7 +810,7 @@ static void initcol(PREC q[][64])
}
/* This is optimized for the stupid sun SUNWspro compiler. */
-#define STORECLAMP(a,x) \
+#define STORECLAMP(a, x) \
( \
(a) = (x), \
(unsigned int)(x) >= 256 ? \
@@ -825,8 +825,8 @@ static void initcol(PREC q[][64])
#define CBCRCG(yin, xin) \
( \
- cb = outc[0 +yin*8+xin], \
- cr = outc[64+yin*8+xin], \
+ cb = outc[0 + yin * 8 + xin], \
+ cr = outc[64 + yin * 8 + xin], \
cg = (50 * cb + 130 * cr + 128) >> 8 \
)
@@ -834,8 +834,8 @@ static void initcol(PREC q[][64])
#define CBCRCG(yin, xin) \
( \
- cb = outc[0 +yin*8+xin], \
- cr = outc[64+yin*8+xin], \
+ cb = outc[0 + yin*8 + xin], \
+ cr = outc[64 + yin*8 + xin], \
cg = (3 * cb + 8 * cr) >> 4 \
)