@@ -409,12 +409,10 @@ static bool trace_uprobe_has_same_uprobe(struct trace_uprobe *orig,
409
409
struct trace_uprobe * comp )
410
410
{
411
411
struct trace_probe_event * tpe = orig -> tp .event ;
412
- struct trace_probe * pos ;
413
412
struct inode * comp_inode = d_real_inode (comp -> path .dentry );
414
413
int i ;
415
414
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 ) {
418
416
if (comp_inode != d_real_inode (orig -> path .dentry ) ||
419
417
comp -> offset != orig -> offset )
420
418
continue ;
@@ -1072,14 +1070,12 @@ static int trace_uprobe_enable(struct trace_uprobe *tu, filter_func_t filter)
1072
1070
1073
1071
static void __probe_event_disable (struct trace_probe * tp )
1074
1072
{
1075
- struct trace_probe * pos ;
1076
1073
struct trace_uprobe * tu ;
1077
1074
1078
1075
tu = container_of (tp , struct trace_uprobe , tp );
1079
1076
WARN_ON (!uprobe_filter_is_empty (tu -> tp .event -> filter ));
1080
1077
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 ) {
1083
1079
if (!tu -> inode )
1084
1080
continue ;
1085
1081
@@ -1091,7 +1087,7 @@ static void __probe_event_disable(struct trace_probe *tp)
1091
1087
static int probe_event_enable (struct trace_event_call * call ,
1092
1088
struct trace_event_file * file , filter_func_t filter )
1093
1089
{
1094
- struct trace_probe * pos , * tp ;
1090
+ struct trace_probe * tp ;
1095
1091
struct trace_uprobe * tu ;
1096
1092
bool enabled ;
1097
1093
int ret ;
@@ -1126,8 +1122,7 @@ static int probe_event_enable(struct trace_event_call *call,
1126
1122
if (ret )
1127
1123
goto err_flags ;
1128
1124
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 ) {
1131
1126
ret = trace_uprobe_enable (tu , filter );
1132
1127
if (ret ) {
1133
1128
__probe_event_disable (tp );
@@ -1272,7 +1267,7 @@ static bool trace_uprobe_filter_add(struct trace_uprobe_filter *filter,
1272
1267
static int uprobe_perf_close (struct trace_event_call * call ,
1273
1268
struct perf_event * event )
1274
1269
{
1275
- struct trace_probe * pos , * tp ;
1270
+ struct trace_probe * tp ;
1276
1271
struct trace_uprobe * tu ;
1277
1272
int ret = 0 ;
1278
1273
@@ -1284,8 +1279,7 @@ static int uprobe_perf_close(struct trace_event_call *call,
1284
1279
if (trace_uprobe_filter_remove (tu -> tp .event -> filter , event ))
1285
1280
return 0 ;
1286
1281
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 ) {
1289
1283
ret = uprobe_apply (tu -> inode , tu -> offset , & tu -> consumer , false);
1290
1284
if (ret )
1291
1285
break ;
@@ -1297,7 +1291,7 @@ static int uprobe_perf_close(struct trace_event_call *call,
1297
1291
static int uprobe_perf_open (struct trace_event_call * call ,
1298
1292
struct perf_event * event )
1299
1293
{
1300
- struct trace_probe * pos , * tp ;
1294
+ struct trace_probe * tp ;
1301
1295
struct trace_uprobe * tu ;
1302
1296
int err = 0 ;
1303
1297
@@ -1309,8 +1303,7 @@ static int uprobe_perf_open(struct trace_event_call *call,
1309
1303
if (trace_uprobe_filter_add (tu -> tp .event -> filter , event ))
1310
1304
return 0 ;
1311
1305
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 ) {
1314
1307
err = uprobe_apply (tu -> inode , tu -> offset , & tu -> consumer , true);
1315
1308
if (err ) {
1316
1309
uprobe_perf_close (call , event );
0 commit comments