mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
tools lib traceevent: No need to check for < 0 on an unsigned enum
gcc on f14 32-bit complains:
tools/lib/traceevent/event-parse.c: In function ‘pevent_register_print_function’:
tools/lib/traceevent/event-parse.c:5366:3: error: comparison of unsigned expression < 0 is always false
This is because:
enum pevent_func_arg_type type;
this enum doesn't have any negative value, so gcc makes it an 'unsigned
int'. Fix it by removing the < 0 test.
Cc: David Ahern <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Cc: Steven Rostedt <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
parent
8a38cce4c9
commit
e46466b8bd
1 changed files with 1 additions and 1 deletions
|
|
@ -5363,7 +5363,7 @@ int pevent_register_print_function(struct pevent *pevent,
|
|||
if (type == PEVENT_FUNC_ARG_VOID)
|
||||
break;
|
||||
|
||||
if (type < 0 || type >= PEVENT_FUNC_ARG_MAX_TYPES) {
|
||||
if (type >= PEVENT_FUNC_ARG_MAX_TYPES) {
|
||||
do_warning("Invalid argument type %d", type);
|
||||
ret = PEVENT_ERRNO__INVALID_ARG_TYPE;
|
||||
goto out_free;
|
||||
|
|
|
|||
Loading…
Reference in a new issue