#ifndef __PERF_CONFIG_H #define __PERF_CONFIG_H #include #include struct perf_config_item { char *name; char *value; bool from_system_config; struct list_head node; }; struct perf_config_section { char *name; struct list_head items; bool from_system_config; struct list_head node; }; struct perf_config_set { struct list_head sections; }; extern const char *config_exclusive_filename; typedef int (*config_fn_t)(const char *, const char *, void *); int perf_default_config(const char *, const char *, void *); int perf_config(config_fn_t fn, void *); int perf_config_int(const char *, const char *); u64 perf_config_u64(const char *, const char *); int perf_config_bool(const char *, const char *); int config_error_nonbool(const char *); const char *perf_etc_perfconfig(void); struct perf_config_set *perf_config_set__new(void); void perf_config_set__delete(struct perf_config_set *set); int perf_config_set__collect(struct perf_config_set *set, const char *file_name, const char *var, const char *value); void perf_config__init(void); void perf_config__exit(void); void perf_config__refresh(void); /** * perf_config_sections__for_each - iterate thru all the sections * @list: list_head instance to iterate * @section: struct perf_config_section iterator */ #define perf_config_sections__for_each_entry(list, section) \ list_for_each_entry(section, list, node) /** * perf_config_items__for_each - iterate thru all the items * @list: list_head instance to iterate * @item: struct perf_config_item iterator */ #define perf_config_items__for_each_entry(list, item) \ list_for_each_entry(item, list, node) /** * perf_config_set__for_each - iterate thru all the config section-item pairs * @set: evlist instance to iterate * @section: struct perf_config_section iterator * @item: struct perf_config_item iterator */ #define perf_config_set__for_each_entry(set, section, item) \ perf_config_sections__for_each_entry(&set->sections, section) \ perf_config_items__for_each_entry(§ion->items, item) #endif /* __PERF_CONFIG_H */ cr/dscr_default_test.c?id=c73e44269369e936165f0f9b61f1f09a11dae01c'>commitdiff
diff options
context:
space:
mode:
authorVincent <vincent.stehle@laposte.net>2017-01-30 15:06:43 +0100
committerDavid S. Miller <davem@davemloft.net>2017-01-31 13:07:40 -0500
commitc73e44269369e936165f0f9b61f1f09a11dae01c (patch)
treee2188e900ba06302f8ed2746cb07edd3efbc5c35 /tools/testing/selftests/powerpc/dscr/dscr_default_test.c
parent040587af31228d82c52267f717c9fcdb65f36335 (diff)
net: thunderx: avoid dereferencing xcv when NULL
This fixes the following smatch and coccinelle warnings: drivers/net/ethernet/cavium/thunder/thunder_xcv.c:119 xcv_setup_link() error: we previously assumed 'xcv' could be null (see line 118) [smatch] drivers/net/ethernet/cavium/thunder/thunder_xcv.c:119:16-20: ERROR: xcv is NULL but dereferenced. [coccinelle] Fixes: 6465859aba1e66a5 ("net: thunderx: Add RGMII interface type support") Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net> Cc: Sunil Goutham <sgoutham@cavium.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing/selftests/powerpc/dscr/dscr_default_test.c')