@@ -409,12 +409,10 @@ static bool trace_uprobe_has_same_uprobe(struct trace_uprobe *orig,
409409 struct trace_uprobe * comp )
410410{
411411 struct trace_probe_event * tpe = orig -> tp .event ;
412- struct trace_probe * pos ;
413412 struct inode * comp_inode = d_real_inode (comp -> path .dentry );
414413 int i ;
415414
416- list_for_each_entry (pos , & tpe -> probes , list ) {
417- orig = container_of (pos , struct trace_uprobe , tp );
415+ list_for_each_entry (orig , & tpe -> probes , tp .list ) {
418416 if (comp_inode != d_real_inode (orig -> path .dentry ) ||
419417 comp -> offset != orig -> offset )
420418 continue ;
@@ -1072,14 +1070,12 @@ static int trace_uprobe_enable(struct trace_uprobe *tu, filter_func_t filter)
10721070
10731071static void __probe_event_disable (struct trace_probe * tp )
10741072{
1075- struct trace_probe * pos ;
10761073 struct trace_uprobe * tu ;
10771074
10781075 tu = container_of (tp , struct trace_uprobe , tp );
10791076 WARN_ON (!uprobe_filter_is_empty (tu -> tp .event -> filter ));
10801077
1081- list_for_each_entry (pos , trace_probe_probe_list (tp ), list ) {
1082- tu = container_of (pos , struct trace_uprobe , tp );
1078+ list_for_each_entry (tu , trace_probe_probe_list (tp ), tp .list ) {
10831079 if (!tu -> inode )
10841080 continue ;
10851081
@@ -1091,7 +1087,7 @@ static void __probe_event_disable(struct trace_probe *tp)
10911087static int probe_event_enable (struct trace_event_call * call ,
10921088 struct trace_event_file * file , filter_func_t filter )
10931089{
1094- struct trace_probe * pos , * tp ;
1090+ struct trace_probe * tp ;
10951091 struct trace_uprobe * tu ;
10961092 bool enabled ;
10971093 int ret ;
@@ -1126,8 +1122,7 @@ static int probe_event_enable(struct trace_event_call *call,
11261122 if (ret )
11271123 goto err_flags ;
11281124
1129- list_for_each_entry (pos , trace_probe_probe_list (tp ), list ) {
1130- tu = container_of (pos , struct trace_uprobe , tp );
1125+ list_for_each_entry (tu , trace_probe_probe_list (tp ), tp .list ) {
11311126 ret = trace_uprobe_enable (tu , filter );
11321127 if (ret ) {
11331128 __probe_event_disable (tp );
@@ -1272,7 +1267,7 @@ static bool trace_uprobe_filter_add(struct trace_uprobe_filter *filter,
12721267static int uprobe_perf_close (struct trace_event_call * call ,
12731268 struct perf_event * event )
12741269{
1275- struct trace_probe * pos , * tp ;
1270+ struct trace_probe * tp ;
12761271 struct trace_uprobe * tu ;
12771272 int ret = 0 ;
12781273
@@ -1284,8 +1279,7 @@ static int uprobe_perf_close(struct trace_event_call *call,
12841279 if (trace_uprobe_filter_remove (tu -> tp .event -> filter , event ))
12851280 return 0 ;
12861281
1287- list_for_each_entry (pos , trace_probe_probe_list (tp ), list ) {
1288- tu = container_of (pos , struct trace_uprobe , tp );
1282+ list_for_each_entry (tu , trace_probe_probe_list (tp ), tp .list ) {
12891283 ret = uprobe_apply (tu -> inode , tu -> offset , & tu -> consumer , false);
12901284 if (ret )
12911285 break ;
@@ -1297,7 +1291,7 @@ static int uprobe_perf_close(struct trace_event_call *call,
12971291static int uprobe_perf_open (struct trace_event_call * call ,
12981292 struct perf_event * event )
12991293{
1300- struct trace_probe * pos , * tp ;
1294+ struct trace_probe * tp ;
13011295 struct trace_uprobe * tu ;
13021296 int err = 0 ;
13031297
@@ -1309,8 +1303,7 @@ static int uprobe_perf_open(struct trace_event_call *call,
13091303 if (trace_uprobe_filter_add (tu -> tp .event -> filter , event ))
13101304 return 0 ;
13111305
1312- list_for_each_entry (pos , trace_probe_probe_list (tp ), list ) {
1313- tu = container_of (pos , struct trace_uprobe , tp );
1306+ list_for_each_entry (tu , trace_probe_probe_list (tp ), tp .list ) {
13141307 err = uprobe_apply (tu -> inode , tu -> offset , & tu -> consumer , true);
13151308 if (err ) {
13161309 uprobe_perf_close (call , event );
0 commit comments