@@ -1328,14 +1328,14 @@ static int user_field_set_string(struct ftrace_event_field *field,
1328
1328
1329
1329
static int user_event_set_print_fmt (struct user_event * user , char * buf , int len )
1330
1330
{
1331
- struct ftrace_event_field * field , * next ;
1331
+ struct ftrace_event_field * field ;
1332
1332
struct list_head * head = & user -> fields ;
1333
1333
int pos = 0 , depth = 0 ;
1334
1334
const char * str_func ;
1335
1335
1336
1336
pos += snprintf (buf + pos , LEN_OR_ZERO , "\"" );
1337
1337
1338
- list_for_each_entry_safe_reverse (field , next , head , link ) {
1338
+ list_for_each_entry_reverse (field , head , link ) {
1339
1339
if (depth != 0 )
1340
1340
pos += snprintf (buf + pos , LEN_OR_ZERO , " " );
1341
1341
@@ -1347,7 +1347,7 @@ static int user_event_set_print_fmt(struct user_event *user, char *buf, int len)
1347
1347
1348
1348
pos += snprintf (buf + pos , LEN_OR_ZERO , "\"" );
1349
1349
1350
- list_for_each_entry_safe_reverse (field , next , head , link ) {
1350
+ list_for_each_entry_reverse (field , head , link ) {
1351
1351
if (user_field_is_dyn_string (field -> type , & str_func ))
1352
1352
pos += snprintf (buf + pos , LEN_OR_ZERO ,
1353
1353
", %s(%s)" , str_func , field -> name );
@@ -1732,15 +1732,15 @@ static int user_event_create(const char *raw_command)
1732
1732
static int user_event_show (struct seq_file * m , struct dyn_event * ev )
1733
1733
{
1734
1734
struct user_event * user = container_of (ev , struct user_event , devent );
1735
- struct ftrace_event_field * field , * next ;
1735
+ struct ftrace_event_field * field ;
1736
1736
struct list_head * head ;
1737
1737
int depth = 0 ;
1738
1738
1739
1739
seq_printf (m , "%s%s" , USER_EVENTS_PREFIX , EVENT_NAME (user ));
1740
1740
1741
1741
head = trace_get_fields (& user -> call );
1742
1742
1743
- list_for_each_entry_safe_reverse (field , next , head , link ) {
1743
+ list_for_each_entry_reverse (field , head , link ) {
1744
1744
if (depth == 0 )
1745
1745
seq_puts (m , " " );
1746
1746
else
@@ -1816,13 +1816,14 @@ static bool user_field_match(struct ftrace_event_field *field, int argc,
1816
1816
static bool user_fields_match (struct user_event * user , int argc ,
1817
1817
const char * * argv )
1818
1818
{
1819
- struct ftrace_event_field * field , * next ;
1819
+ struct ftrace_event_field * field ;
1820
1820
struct list_head * head = & user -> fields ;
1821
1821
int i = 0 ;
1822
1822
1823
- list_for_each_entry_safe_reverse (field , next , head , link )
1823
+ list_for_each_entry_reverse (field , head , link ) {
1824
1824
if (!user_field_match (field , argc , argv , & i ))
1825
1825
return false;
1826
+ }
1826
1827
1827
1828
if (i != argc )
1828
1829
return false;
0 commit comments