Re: [PATCH 3/3] soc: qcom: rpmh-rsc: Fold WARN_ON() into if condition

From: Doug Anderson
Date: Fri Apr 24 2020 - 13:12:00 EST


Hi,

On Thu, Apr 23, 2020 at 9:54 PM Stephen Boyd <swboyd@xxxxxxxxxxxx> wrote:
>
> Move the WARN_ON() into the if condition so the compiler can see that
> the branch is unlikely() and possibly optimize it better.
>
> Cc: Maulik Shah <mkshah@xxxxxxxxxxxxxx>
> Cc: Douglas Anderson <dianders@xxxxxxxxxxxx>
> Signed-off-by: Stephen Boyd <swboyd@xxxxxxxxxxxx>
> ---
> drivers/soc/qcom/rpmh-rsc.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)

Reviewed-by: Douglas Anderson <dianders@xxxxxxxxxxxx>