From 425f92c00958a1824ff390d02bd28b26cb02ef97 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Wed, 16 Oct 2024 16:49:10 +0100 Subject: [PATCH] usb-spec: move the opening curly brackets to end of line That's our defined style and that we've been using in the majority of the codebase. Disable clang-format on a couple of sections, where it gets a silly moment and insists on reformatting everything. Signed-off-by: Emil Velikov --- usb-spec.h | 34 ++++++++++++++-------------------- 1 file changed, 14 insertions(+), 20 deletions(-) diff --git a/usb-spec.h b/usb-spec.h index dbe484d..48118c9 100644 --- a/usb-spec.h +++ b/usb-spec.h @@ -27,8 +27,7 @@ struct genericstrtable { /* ---------------------------------------------------------------------- */ -static const struct audioterminal audioterminals[] = -{ +static const struct audioterminal audioterminals[] = { { 0x0100, "USB Undefined" }, { 0x0101, "USB Streaming" }, { 0x01ff, "USB Vendor Specific" }, @@ -88,8 +87,7 @@ static const struct audioterminal audioterminals[] = { 0x0000, NULL }, }; -static const struct videoterminal videoterminals[] = -{ +static const struct videoterminal videoterminals[] = { { 0x0100, "USB Vendor Specific" }, { 0x0101, "USB Streaming" }, { 0x0200, "Input Vendor Specific" }, @@ -105,16 +103,14 @@ static const struct videoterminal videoterminals[] = { 0x0000, NULL }, }; -static const struct genericstrtable hiddescriptors[] = -{ +static const struct genericstrtable hiddescriptors[] = { { 0x21, "HID" }, { 0x22, "Report" }, { 0x23, "Physical" }, { 0x00, NULL }, }; -static const struct genericstrtable reports[] = -{ +static const struct genericstrtable reports[] = { { 0x04, "Usage Page" }, { 0x08, "Usage" }, { 0x14, "Logical Minimum" }, @@ -145,8 +141,7 @@ static const struct genericstrtable reports[] = { 0x00, NULL }, }; -static const struct genericstrtable huts[] = -{ +static const struct genericstrtable huts[] = { { 0x00, "Undefined" }, { 0x01, "Generic Desktop Controls" }, { 0x02, "Simulation Controls" }, @@ -179,18 +174,19 @@ static const struct genericstrtable huts[] = { 0x00, NULL }, }; -static const struct genericstrtable biass[] = -{ +static const struct genericstrtable biass[] = { + // clang-format off { 0x0, "Not Applicable" }, { 0x1, "Right Hand" }, { 0x2, "Left Hand" }, { 0x3, "Both Hands" }, { 0x4, "Either Hand" }, { 0x0, NULL }, + // clang-format on }; -static const struct genericstrtable physdess[] = -{ +static const struct genericstrtable physdess[] = { + // clang-format off { 0x00, "None" }, { 0x01, "Hand" }, { 0x02, "Eyeball" }, @@ -232,13 +228,13 @@ static const struct genericstrtable physdess[] = { 0x26, "Brow" }, { 0x27, "Cheek" }, { 0x00, NULL }, + // clang-format on }; /* HUT usage specs are represented as: * (huttype << 16) + hutus */ -static const struct genericstrtable hutus[] = -{ +static const struct genericstrtable hutus[] = { { (0x01 << 16) + 0x000, "Undefined" }, { (0x01 << 16) + 0x001, "Pointer" }, { (0x01 << 16) + 0x002, "Mouse" }, @@ -1385,8 +1381,7 @@ static const struct genericstrtable hutus[] = /* dialects are represented as: * langid + (dialectid << 10) */ -static const struct genericstrtable langids[] = -{ +static const struct genericstrtable langids[] = { { 0x0001 + (0x01 << 10), "Saudi Arabia" }, { 0x0001 + (0x02 << 10), "Iraq" }, { 0x0001 + (0x03 << 10), "Egypt" }, @@ -1552,8 +1547,7 @@ static const struct genericstrtable langids[] = { 0x0000, NULL }, }; -static const struct genericstrtable countrycodes[] = -{ +static const struct genericstrtable countrycodes[] = { { 0, "Not supported" }, { 1, "Arabic" }, { 2, "Belgian" },