Skip to content

Conversation

@sjg20
Copy link
Contributor

@sjg20 sjg20 commented Jan 19, 2023

This seems to be handling an error case incorrectly.

board/hx30/cypress5525.c: In function 'cyp5525_port_int': board/hx30/cypress5525.c:974:9: error: this 'if' clause does not guard...
[-Werror=misleading-indentation]
974 | if (rv != EC_SUCCESS)
| ^~
board/hx30/cypress5525.c:976:17: note: ...this statement, but the latter
is misleadingly indented as if it were guarded by the 'if'
976 | print_pd_response_code(controller,
| ^~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Simon Glass [email protected]

This seems to be handling an error case incorrectly.

board/hx30/cypress5525.c: In function 'cyp5525_port_int':
board/hx30/cypress5525.c:974:9: error: this 'if' clause does not guard...
   [-Werror=misleading-indentation]
  974 |         if (rv != EC_SUCCESS)
      |         ^~
board/hx30/cypress5525.c:976:17: note: ...this statement, but the latter
   is misleadingly indented as if it were guarded by the 'if'
  976 |                 print_pd_response_code(controller,
      |                 ^~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Simon Glass <[email protected]>
@github-actions
Copy link

CLA Assistant Lite bot:
Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request

@pantsman0
Copy link

This is possibly an incorrect fix. Looking at the same functionality in the hx20 branch, the offending line is just de-indented -

print_pd_response_code(controller,

If this is an actual issue, it needs to be resolved in the hx20 board too.

Copy link

@storopoli storopoli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works in my i5 1240P thanks

pantsman0 added a commit to pantsman0/EmbeddedController that referenced this pull request Apr 7, 2023
Fixes the pd response print in the hx20 board, inline with the approved changes for hx30 at FrameworkComputer#24
@pantsman0 pantsman0 mentioned this pull request Apr 7, 2023
pantsman0 added a commit to pantsman0/EmbeddedController that referenced this pull request Apr 7, 2023
kiram9 and others added 2 commits May 10, 2023 21:16
We actually always want to call 
print_pd_response_code for verbose debugging purposes, so we do not want to wrap this print in the error check
@kiram9 kiram9 merged commit 7d4dcbd into FrameworkComputer:hx20-hx30 May 10, 2023
@github-actions github-actions bot locked and limited conversation to collaborators May 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants