soc/samsung/exynos5420: Use int instead of char for count variable

This micro optimization of using unsigned char instead of unsigned
integer actually generates one more instruction.

    .LVL296:                                                        .LVL296:
    .L198:                                                          .L198:
            .loc 1 912 16 is_stmt 1 discriminator 1 view .LVU1740           .loc 1 912 16 is_stmt 1 discriminator 1 view .LVU1740
            uxtb    r2, r3                                        |         cmp     r7, r3
            cmp     r7, r2                                        <
            bhi     .L199                                                   bhi     .L199
            .loc 1 916 1 is_stmt 0 view .LVU1741                            .loc 1 916 1 is_stmt 0 view .LVU1741
            add     sp, sp, #36                                             add     sp, sp, #36
            .cfi_remember_state                                             .cfi_remember_state
            .cfi_def_cfa_offset 20                                          .cfi_def_cfa_offset 20
            @ sp needed                                                     @ sp needed
            pop     {r4, r5, r6, r7, pc}                                    pop     {r4, r5, r6, r7, pc}

Fix it, so nobody can copy that.

Change-Id: If5ffeacc7ac3c53a82b260cfb81ef7debc40034a
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65731
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
This commit is contained in:
Paul Menzel
2022-06-10 11:43:01 +02:00
committed by Felix Held
parent 5c2b5fcf2f
commit 42a7cd0d99

View File

@ -894,7 +894,7 @@ void exynos_dp_set_lanex_pre_emphasis(unsigned char request_val,
void exynos_dp_set_lane_pre_emphasis(unsigned int level, unsigned char lanecnt) void exynos_dp_set_lane_pre_emphasis(unsigned int level, unsigned char lanecnt)
{ {
unsigned char i; unsigned int i;
u32 reg; u32 reg;
void *reg_list[DP_LANE_CNT_4] = { void *reg_list[DP_LANE_CNT_4] = {
&dp_regs->ln0_link_training_ctl, &dp_regs->ln0_link_training_ctl,