Commit 0dffb6a
libbpf: Extract BTF type remapping logic into helper function
Refactor btf_dedup_remap_types() by extracting its core logic into a new
btf_remap_types() helper function. This eliminates code duplication
and improves modularity while maintaining the same functionality.
The new function encapsulates iteration over BTF types and BTF ext
sections, accepting a callback for flexible type ID remapping. This
makes the type remapping logic more maintainable and reusable.
Cc: Eduard Zingerman <[email protected]>
Cc: Alexei Starovoitov <[email protected]>
Cc: Andrii Nakryiko <[email protected]>
Cc: Alan Maguire <[email protected]>
Cc: Song Liu <[email protected]>
Cc: Xiaoqin Zhang <[email protected]>
Signed-off-by: Donglin Peng <[email protected]>
Signed-off-by: Donglin Peng <[email protected]>
Reviewed-by: Eduard Zingerman <[email protected]>1 parent 2456350 commit 0dffb6a
1 file changed
+32
-31
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3400 | 3400 | | |
3401 | 3401 | | |
3402 | 3402 | | |
| 3403 | + | |
| 3404 | + | |
| 3405 | + | |
| 3406 | + | |
| 3407 | + | |
| 3408 | + | |
| 3409 | + | |
| 3410 | + | |
| 3411 | + | |
| 3412 | + | |
| 3413 | + | |
| 3414 | + | |
| 3415 | + | |
| 3416 | + | |
| 3417 | + | |
| 3418 | + | |
| 3419 | + | |
| 3420 | + | |
| 3421 | + | |
| 3422 | + | |
| 3423 | + | |
| 3424 | + | |
| 3425 | + | |
| 3426 | + | |
| 3427 | + | |
| 3428 | + | |
| 3429 | + | |
| 3430 | + | |
| 3431 | + | |
| 3432 | + | |
| 3433 | + | |
3403 | 3434 | | |
3404 | 3435 | | |
3405 | 3436 | | |
| |||
5320 | 5351 | | |
5321 | 5352 | | |
5322 | 5353 | | |
5323 | | - | |
5324 | | - | |
5325 | | - | |
5326 | | - | |
5327 | | - | |
5328 | | - | |
5329 | | - | |
5330 | | - | |
5331 | | - | |
5332 | | - | |
5333 | | - | |
5334 | | - | |
5335 | | - | |
5336 | | - | |
5337 | | - | |
5338 | | - | |
5339 | | - | |
5340 | | - | |
5341 | | - | |
5342 | | - | |
5343 | | - | |
5344 | | - | |
5345 | | - | |
5346 | | - | |
5347 | | - | |
5348 | | - | |
5349 | | - | |
5350 | | - | |
5351 | | - | |
5352 | | - | |
5353 | | - | |
| 5354 | + | |
5354 | 5355 | | |
5355 | 5356 | | |
5356 | 5357 | | |
| |||
0 commit comments