Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
cypress5525: Correct a compiler warning
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]>
  • Loading branch information
sjg20 committed Jan 19, 2023
commit 8c4efe7c185bc270c4f22d2caad1aee12d029867
3 changes: 2 additions & 1 deletion board/hx30/cypress5525.c
Original file line number Diff line number Diff line change
Expand Up @@ -971,12 +971,13 @@ void cyp5525_port_int(int controller, int port)
int port_idx = (controller << 1) + port;
/* enum pd_msg_type sop_type; */
rv = i2c_read_offset16_block(i2c_port, addr_flags, CYP5525_PORT_PD_RESPONSE_REG(port), data2, 4);
if (rv != EC_SUCCESS)
if (rv != EC_SUCCESS) {
CPRINTS("PORT_PD_RESPONSE_REG failed");
print_pd_response_code(controller,
port,
data2[0],
data2[1]);
}

response_len = data2[1];
switch (data2[0]) {
Expand Down