Skip to content

Commit

Permalink
opal_trace_entry: Move ifdef around to shut up static analysis
Browse files Browse the repository at this point in the history
Again, this makes things look slightly different so I don't keep seeing
the static analysis warning.

Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
  • Loading branch information
stewartsmith committed Dec 11, 2018
1 parent 685f078 commit 0714735
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/opal.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ long opal_bad_token(uint64_t token)
return OPAL_PARAMETER;
}

#ifdef OPAL_TRACE_ENTRY
static void opal_trace_entry(struct stack_frame *eframe __unused)
{
#ifdef OPAL_TRACE_ENTRY
union trace t;
unsigned nargs, i;

Expand All @@ -111,8 +111,8 @@ static void opal_trace_entry(struct stack_frame *eframe __unused)
t.opal.r3_to_11[i] = cpu_to_be64(eframe->gpr[3+i]);

trace_add(&t, TRACE_OPAL, offsetof(struct trace_opal, r3_to_11[nargs]));
#endif
}
#endif

/*
* opal_quiesce_state is used as a lock. Don't use an actual lock to avoid
Expand All @@ -138,7 +138,9 @@ int64_t opal_entry_check(struct stack_frame *eframe)
abort();
}

#ifdef OPAL_TRACE_ENTRY
opal_trace_entry(eframe);
#endif

if (!opal_check_token(token))
return opal_bad_token(token);
Expand Down

0 comments on commit 0714735

Please sign in to comment.