summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLee Leahy <leroy.p.leahy@intel.com>2017-03-09 13:35:26 -0800
committerMartin Roth <martinroth@google.com>2017-03-12 19:19:07 +0100
commitb6ee0f9d920fa9cfb19f5340608bf0df72f16468 (patch)
tree286ab05835b81918491d9c1b027835de180723fc /src
parentbfdb8937b27700546bc233287c657e2f634a3177 (diff)
downloadcoreboot-b6ee0f9d920fa9cfb19f5340608bf0df72f16468.tar.xz
src/lib: Move trailing statements to next line
Fix the following error detected by checkpatch.pl: ERROR: trailing statements should be on next line The remaining error is a false positive in libgcov.c where the if statement spans several lines with conditional compilation directives intertwined. TEST=Build and run on Galileo Gen2 Change-Id: I37fcef78e9323340bac1367ae1c5fde334f5ce10 Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com> Reviewed-on: https://review.coreboot.org/18730 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/lib/edid.c108
-rw-r--r--src/lib/jpeg.c3
-rw-r--r--src/lib/lzmadecode.c15
3 files changed, 91 insertions, 35 deletions
diff --git a/src/lib/edid.c b/src/lib/edid.c
index 7138b8b256..50a023819f 100644
--- a/src/lib/edid.c
+++ b/src/lib/edid.c
@@ -382,12 +382,24 @@ detailed_block(struct edid *result_edid, unsigned char *x, int in_extension,
printk(BIOS_SPEW, "Preferred aspect ratio: ");
switch ((x[15] & 0xe0) >> 5) {
- case 0x00: printk(BIOS_SPEW, "4:3"); break;
- case 0x01: printk(BIOS_SPEW, "16:9"); break;
- case 0x02: printk(BIOS_SPEW, "16:10"); break;
- case 0x03: printk(BIOS_SPEW, "5:4"); break;
- case 0x04: printk(BIOS_SPEW, "15:9"); break;
- default: printk(BIOS_SPEW, "(broken)"); break;
+ case 0x00:
+ printk(BIOS_SPEW, "4:3");
+ break;
+ case 0x01:
+ printk(BIOS_SPEW, "16:9");
+ break;
+ case 0x02:
+ printk(BIOS_SPEW, "16:10");
+ break;
+ case 0x03:
+ printk(BIOS_SPEW, "5:4");
+ break;
+ case 0x04:
+ printk(BIOS_SPEW, "15:9");
+ break;
+ default:
+ printk(BIOS_SPEW, "(broken)");
+ break;
}
printk(BIOS_SPEW, "\n");
@@ -709,7 +721,8 @@ cea_hdmi_block(struct edid *out, unsigned char *x)
mask = 1;
}
switch (x[9 + b] & 0x18) {
- case 0x00: break;
+ case 0x00:
+ break;
case 0x08:
printk(BIOS_SPEW, " Base EDID image size is aspect ratio\n");
break;
@@ -854,7 +867,8 @@ parse_cea(struct edid *out, unsigned char *x, struct edid_context *c)
int offset = x[2];
unsigned char *detailed;
- if (version >= 1) do {
+ if (version >= 1)
+ do {
if (version == 1 && x[3] != 0)
ret = 1;
@@ -913,12 +927,23 @@ parse_extension(struct edid *out, unsigned char *x, struct edid_context *c)
extension_version(out, x);
conformant_extension = parse_cea(out, x, c);
break;
- case 0x10: printk(BIOS_SPEW, "VTB extension block\n"); break;
- case 0x40: printk(BIOS_SPEW, "DI extension block\n"); break;
- case 0x50: printk(BIOS_SPEW, "LS extension block\n"); break;
- case 0x60: printk(BIOS_SPEW, "DPVL extension block\n"); break;
- case 0xF0: printk(BIOS_SPEW, "Block map\n"); break;
- case 0xFF: printk(BIOS_SPEW, "Manufacturer-specific extension block\n");
+ case 0x10:
+ printk(BIOS_SPEW, "VTB extension block\n");
+ break;
+ case 0x40:
+ printk(BIOS_SPEW, "DI extension block\n");
+ break;
+ case 0x50:
+ printk(BIOS_SPEW, "LS extension block\n");
+ break;
+ case 0x60:
+ printk(BIOS_SPEW, "DPVL extension block\n");
+ break;
+ case 0xF0:
+ printk(BIOS_SPEW, "Block map\n");
+ break;
+ case 0xFF:
+ printk(BIOS_SPEW, "Manufacturer-specific extension block\n");
default:
printk(BIOS_SPEW, "Unknown extension block\n");
break;
@@ -1140,14 +1165,27 @@ int decode_edid(unsigned char *edid, int size, struct edid *out)
out->panel_bits_per_pixel = 3*out->panel_bits_per_color;
switch (edid[0x14] & 0x0f) {
- case 0x00: printk(BIOS_SPEW, "Digital interface is not defined\n"); break;
- case 0x01: printk(BIOS_SPEW, "DVI interface\n"); break;
- case 0x02: printk(BIOS_SPEW, "HDMI-a interface\n"); break;
- case 0x03: printk(BIOS_SPEW, "HDMI-b interface\n"); break;
- case 0x04: printk(BIOS_SPEW, "MDDI interface\n"); break;
- case 0x05: printk(BIOS_SPEW, "DisplayPort interface\n"); break;
+ case 0x00:
+ printk(BIOS_SPEW, "Digital interface is not defined\n");
+ break;
+ case 0x01:
+ printk(BIOS_SPEW, "DVI interface\n");
+ break;
+ case 0x02:
+ printk(BIOS_SPEW, "HDMI-a interface\n");
+ break;
+ case 0x03:
+ printk(BIOS_SPEW, "HDMI-b interface\n");
+ break;
+ case 0x04:
+ printk(BIOS_SPEW, "MDDI interface\n");
+ break;
+ case 0x05:
+ printk(BIOS_SPEW, "DisplayPort interface\n");
+ break;
default:
- c.nonconformant_digital_display = 1;
+ c.nonconformant_digital_display = 1;
+ break;
}
extra_info.type = edid[0x14] & 0x0f;
} else if (c.claims_one_point_two) {
@@ -1218,23 +1256,35 @@ int decode_edid(unsigned char *edid, int size, struct edid *out)
else
/* XXX Technically 1.3 doesn't say this... */
printk(BIOS_SPEW, "Gamma: 1.0\n");
- } else printk(BIOS_SPEW, "Gamma: %d%%\n", ((edid[0x17] + 100)));
+ } else
+ printk(BIOS_SPEW, "Gamma: %d%%\n", ((edid[0x17] + 100)));
printk(BIOS_SPEW, "Check DPMS levels\n");
if (edid[0x18] & 0xE0) {
printk(BIOS_SPEW, "DPMS levels:");
- if (edid[0x18] & 0x80) printk(BIOS_SPEW, " Standby");
- if (edid[0x18] & 0x40) printk(BIOS_SPEW, " Suspend");
- if (edid[0x18] & 0x20) printk(BIOS_SPEW, " Off");
+ if (edid[0x18] & 0x80)
+ printk(BIOS_SPEW, " Standby");
+ if (edid[0x18] & 0x40)
+ printk(BIOS_SPEW, " Suspend");
+ if (edid[0x18] & 0x20)
+ printk(BIOS_SPEW, " Off");
printk(BIOS_SPEW, "\n");
}
/* FIXME: this is from 1.4 spec, check earlier */
if (analog) {
switch (edid[0x18] & 0x18) {
- case 0x00: printk(BIOS_SPEW, "Monochrome or grayscale display\n"); break;
- case 0x08: printk(BIOS_SPEW, "RGB color display\n"); break;
- case 0x10: printk(BIOS_SPEW, "Non-RGB color display\n"); break;
- case 0x18: printk(BIOS_SPEW, "Undefined display color type\n");
+ case 0x00:
+ printk(BIOS_SPEW, "Monochrome or grayscale display\n");
+ break;
+ case 0x08:
+ printk(BIOS_SPEW, "RGB color display\n");
+ break;
+ case 0x10:
+ printk(BIOS_SPEW, "Non-RGB color display\n");
+ break;
+ case 0x18:
+ printk(BIOS_SPEW, "Undefined display color type\n");
+ break;
}
} else {
printk(BIOS_SPEW, "Supported color formats: RGB 4:4:4");
diff --git a/src/lib/jpeg.c b/src/lib/jpeg.c
index e6626b8131..c07109d099 100644
--- a/src/lib/jpeg.c
+++ b/src/lib/jpeg.c
@@ -498,7 +498,8 @@ static int dec_rec2(struct in *in, struct dec_hufftbl *hu, int *runp, int c,
*runp = i >> 8 & 15;
i >>= 16;
} else {
- for (i = DECBITS; (c = ((c << 1) | GETBITS(in, 1))) >= (hu->maxcode[i]); i++);
+ for (i = DECBITS; (c = ((c << 1) | GETBITS(in, 1))) >= (hu->maxcode[i]); i++)
+ ;
if (i >= 16) {
in->marker = M_BADHUFF;
return 0;
diff --git a/src/lib/lzmadecode.c b/src/lib/lzmadecode.c
index 2f1a214fa5..2b03c22224 100644
--- a/src/lib/lzmadecode.c
+++ b/src/lib/lzmadecode.c
@@ -123,8 +123,10 @@ int LzmaDecodeProperties(CLzmaProperties *propsRes, const unsigned char *propsDa
if (prop0 >= (9 * 5 * 5))
return LZMA_RESULT_DATA_ERROR;
{
- for (propsRes->pb = 0; prop0 >= (9 * 5); propsRes->pb++, prop0 -= (9 * 5));
- for (propsRes->lp = 0; prop0 >= 9; propsRes->lp++, prop0 -= 9);
+ for (propsRes->pb = 0; prop0 >= (9 * 5); propsRes->pb++, prop0 -= (9 * 5))
+ ;
+ for (propsRes->lp = 0; prop0 >= 9; propsRes->lp++, prop0 -= 9)
+ ;
propsRes->lc = prop0;
/*
unsigned char remainder = (unsigned char)(prop0 / 9);
@@ -221,9 +223,12 @@ int LzmaDecode(CLzmaDecoderState *vs,
previousByte = (Byte)symbol;
outStream[nowPos++] = previousByte;
- if (state < 4) state = 0;
- else if (state < 10) state -= 3;
- else state -= 6;
+ if (state < 4)
+ state = 0;
+ else if (state < 10)
+ state -= 3;
+ else
+ state -= 6;
}
else
{