Fix style issues and enable style checks
The enabled checks `3abdefhiklnprSx` are what we already live by
but didn't enforce so far. One check that we use internally, yet
omit here is `t`, token spacing. It's too aggressive and doesn't
allow for manual alignment of tables. The set of checks seems to
to fit our code base rather well, otherwise.
So following checks will be performed:
`3` Specify indentation level: 3 spaces.
`a` Check attribute casing: Attributes should appear in mixed case
`b` Blanks not allowed at statement end
`d` Check no DOS line terminators present: No CR/LF
`e` Check end/exit labels
`f` No form feeds or vertical tabs
`h` No horizontal tabs: We always use spaces
`i` Check if-then layout
`k` Check keyword casing: Keywords should appear in lower case
`l` Check layout: Follow layout recommendation of the Ada RM
`n` Check casing of entities in Standard: Should follow the Ada RM
`p` Check pragma casing: Should appear in mixed case
`r` Check reference: Identifiers should appear as in the declaration
`S` Check no statements after then/else
`x` Check extra parentheses: No C-syle parents arounds conditions
Change-Id: Ia07c571c3e3e4e49d8559099511b217ade86f33f
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.sourcearcade.org/c/libgfxinit/+/533
Reviewed-by: Thomas Heijligen <src@posteo.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: Nico Huber <nico.h@gmx.de>
diff --git a/common/hw-gfx-gma-i2c.adb b/common/hw-gfx-gma-i2c.adb
index 2e0dde0..737d240 100644
--- a/common/hw-gfx-gma-i2c.adb
+++ b/common/hw-gfx-gma-i2c.adb
@@ -119,17 +119,17 @@
begin
return
(if Config.Has_Type_C_Ports then
- (case Port is
- when PCH_HDMI_A => GMBUS0_PIN_PAIR_SELECT_TGL_1,
- when PCH_HDMI_B => GMBUS0_PIN_PAIR_SELECT_TGL_2,
- when PCH_HDMI_C => GMBUS0_PIN_PAIR_SELECT_TGL_3,
- when PCH_TC1 => GMBUS0_PIN_PAIR_SELECT_TGL_TC1,
- when PCH_TC2 => GMBUS0_PIN_PAIR_SELECT_TGL_TC2,
- when PCH_TC3 => GMBUS0_PIN_PAIR_SELECT_TGL_TC3,
- when PCH_TC4 => GMBUS0_PIN_PAIR_SELECT_TGL_TC4,
- when PCH_TC5 => GMBUS0_PIN_PAIR_SELECT_TGL_TC5,
- when PCH_TC6 => GMBUS0_PIN_PAIR_SELECT_TGL_TC6,
- when others => GMBUS0_PIN_PAIR_SELECT_NONE)
+ (case Port is
+ when PCH_HDMI_A => GMBUS0_PIN_PAIR_SELECT_TGL_1,
+ when PCH_HDMI_B => GMBUS0_PIN_PAIR_SELECT_TGL_2,
+ when PCH_HDMI_C => GMBUS0_PIN_PAIR_SELECT_TGL_3,
+ when PCH_TC1 => GMBUS0_PIN_PAIR_SELECT_TGL_TC1,
+ when PCH_TC2 => GMBUS0_PIN_PAIR_SELECT_TGL_TC2,
+ when PCH_TC3 => GMBUS0_PIN_PAIR_SELECT_TGL_TC3,
+ when PCH_TC4 => GMBUS0_PIN_PAIR_SELECT_TGL_TC4,
+ when PCH_TC5 => GMBUS0_PIN_PAIR_SELECT_TGL_TC5,
+ when PCH_TC6 => GMBUS0_PIN_PAIR_SELECT_TGL_TC6,
+ when others => GMBUS0_PIN_PAIR_SELECT_NONE)
elsif Config.GMBUS_Alternative_Pins then
(case Port is
when PCH_HDMI_B => GMBUS0_PIN_PAIR_SELECT_BXT_B,
@@ -256,11 +256,11 @@
GMBUS1_DIRECTION_READ);
while Success and then Transfered < Length loop
- -- Some GMBUS state machines never set HW_RDY nor NAK.
- --
- -- Keep delay at a minimum, but big enough that
- -- regular EDID transfers can be finished within
- -- the timeout.
+ -- Some GMBUS state machines never set HW_RDY nor NAK.
+ --
+ -- Keep delay at a minimum, but big enough that
+ -- regular EDID transfers can be finished within
+ -- the timeout.
Registers.Wait_Set_Mask
(Register => GMBUS_Regs (2),
Mask => GMBUS2_HARDWARE_READY,