Commit 868a8f1
cxl/region: Factor out code to find a root decoder's region
In function cxl_add_to_region() there is code to determine a root
decoder's region. Factor that code out. This is in preparation to
further rework and simplify function cxl_add_to_region().
The reference count must be decremented after using the region.
cxl_find_region_by_range() is paired with the put_cxl_region cleanup
helper that can be used for this.
[dj: Fixed up "obj __free(...) = NULL" pattern]
Signed-off-by: Robert Richter <[email protected]>
Reviewed-by: Gregory Price <[email protected]>
Reviewed-by: Jonathan Cameron <[email protected]>
Reviewed-by: Dave Jiang <[email protected]>
Reviewed-by: Dan Williams <[email protected]>
Reviewed-by: Alison Schofield <[email protected]>
Reviewed-by: "Fabio M. De Francesco" <[email protected]>
Tested-by: Gregory Price <[email protected]>
Acked-by: Dan Williams <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Dave Jiang <[email protected]>1 parent 9466ee9 commit 868a8f1
2 files changed
+17
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3405 | 3405 | | |
3406 | 3406 | | |
3407 | 3407 | | |
| 3408 | + | |
| 3409 | + | |
| 3410 | + | |
| 3411 | + | |
| 3412 | + | |
| 3413 | + | |
| 3414 | + | |
| 3415 | + | |
| 3416 | + | |
| 3417 | + | |
| 3418 | + | |
| 3419 | + | |
| 3420 | + | |
3408 | 3421 | | |
3409 | 3422 | | |
3410 | 3423 | | |
3411 | | - | |
3412 | 3424 | | |
3413 | | - | |
3414 | 3425 | | |
3415 | 3426 | | |
3416 | 3427 | | |
| |||
3424 | 3435 | | |
3425 | 3436 | | |
3426 | 3437 | | |
3427 | | - | |
3428 | | - | |
3429 | | - | |
| 3438 | + | |
| 3439 | + | |
| 3440 | + | |
3430 | 3441 | | |
3431 | | - | |
3432 | | - | |
3433 | | - | |
3434 | 3442 | | |
3435 | 3443 | | |
3436 | 3444 | | |
| |||
3455 | 3463 | | |
3456 | 3464 | | |
3457 | 3465 | | |
3458 | | - | |
3459 | | - | |
3460 | 3466 | | |
3461 | 3467 | | |
3462 | 3468 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
741 | 741 | | |
742 | 742 | | |
743 | 743 | | |
| 744 | + | |
744 | 745 | | |
745 | 746 | | |
746 | 747 | | |
| |||
0 commit comments