Commit ae7c2403 authored by Nathan Chancellor's avatar Nathan Chancellor Committed by Anant Goel
Browse files

UPSTREAM: OPP: Fix -Wunsequenced in _of_add_opp_table_v1()



Clang warns (or errors with CONFIG_WERROR=y):

  drivers/opp/of.c:1081:28: error: multiple unsequenced modifications to 'val' [-Werror,-Wunsequenced]
   1081 |                         .freq = be32_to_cpup(val++) * 1000,
        |                                                 ^
   1082 |                         .u_volt = be32_to_cpup(val++),
        |                                                   ~~
  1 error generated.

There is no sequence point in a designated initializer. Move back to
separate variables for the creation of the values, so that there are
sequence points between each evaluation and increment of val.

Fixes: 75bbc92c09d8 ("OPP: Add dev_pm_opp_add_dynamic() to allow more flexibility")
Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>

Bug: 365888817
Change-Id: I870855263a0db8e35bcf8f150f5e05b2cfbdbc6b
(cherry picked from commit 184ff4f7)
Signed-off-by: default avatarNikunj Kela <quic_nkela@quicinc.com>
Signed-off-by: default avatarAnant Goel <quic_anantg@quicinc.com>
parent f887b56b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment