Skip to content

Commit

Permalink
of/unittest: Swap arguments of of_unittest_apply_overlay()
Browse files Browse the repository at this point in the history
Function signature

  of_unittest_apply_overlay(int unittest_nr, int overlay_nr, ...

and call sites, like in of_unittest_apply_overlay_check():

  ret = of_unittest_apply_overlay(overlay_nr, unittest_nr, ...

do not match. Fix this in one place (function signature).
The only affected test case is 15, which supplies non-existing
overlay number 16, but two bugs matched here. Fix the test case.

Signed-off-by: Alexander Sverdlin <[email protected]>
Cc: Rob Herring <[email protected]>
Cc: Frank Rowand <[email protected]>
Cc: [email protected]
Signed-off-by: Rob Herring <[email protected]>
  • Loading branch information
asverdlin authored and robherring committed Jan 23, 2017
1 parent a51741e commit ca7b896
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/of/unittest.c
Original file line number Diff line number Diff line change
Expand Up @@ -1180,7 +1180,7 @@ static void of_unittest_destroy_tracked_overlays(void)
} while (defers > 0);
}

static int of_unittest_apply_overlay(int unittest_nr, int overlay_nr,
static int of_unittest_apply_overlay(int overlay_nr, int unittest_nr,
int *overlay_id)
{
struct device_node *np = NULL;
Expand Down Expand Up @@ -1839,7 +1839,7 @@ static void of_unittest_overlay_i2c_15(void)
int ret;

/* device should enable */
ret = of_unittest_apply_overlay_check(16, 15, 0, 1, I2C_OVERLAY);
ret = of_unittest_apply_overlay_check(15, 15, 0, 1, I2C_OVERLAY);
if (ret != 0)
return;

Expand Down

0 comments on commit ca7b896

Please sign in to comment.