Commit 9466ee9
cxl/region: Factor out code to find the root decoder
In function cxl_add_to_region() there is code to determine the root
decoder associated to an endpoint decoder. Factor out that code for
later reuse. This has the benefit of reducing cxl_add_to_region()'s
function complexity.
The reference count must be decremented after using the root decoder.
cxl_find_root_decoder() is paired with the put_cxl_root_decoder
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 74bf125 commit 9466ee9
2 files changed
+30
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3216 | 3216 | | |
3217 | 3217 | | |
3218 | 3218 | | |
| 3219 | + | |
| 3220 | + | |
| 3221 | + | |
| 3222 | + | |
| 3223 | + | |
| 3224 | + | |
| 3225 | + | |
| 3226 | + | |
| 3227 | + | |
| 3228 | + | |
| 3229 | + | |
| 3230 | + | |
| 3231 | + | |
| 3232 | + | |
| 3233 | + | |
| 3234 | + | |
| 3235 | + | |
| 3236 | + | |
| 3237 | + | |
| 3238 | + | |
| 3239 | + | |
| 3240 | + | |
| 3241 | + | |
3219 | 3242 | | |
3220 | 3243 | | |
3221 | 3244 | | |
| |||
3384 | 3407 | | |
3385 | 3408 | | |
3386 | 3409 | | |
3387 | | - | |
3388 | | - | |
3389 | | - | |
3390 | 3410 | | |
3391 | | - | |
3392 | | - | |
3393 | | - | |
| 3411 | + | |
3394 | 3412 | | |
3395 | 3413 | | |
3396 | 3414 | | |
3397 | 3415 | | |
3398 | 3416 | | |
3399 | | - | |
3400 | | - | |
3401 | | - | |
3402 | | - | |
3403 | | - | |
3404 | | - | |
3405 | | - | |
| 3417 | + | |
| 3418 | + | |
| 3419 | + | |
3406 | 3420 | | |
3407 | | - | |
3408 | | - | |
3409 | | - | |
3410 | 3421 | | |
3411 | 3422 | | |
3412 | 3423 | | |
| |||
3424 | 3435 | | |
3425 | 3436 | | |
3426 | 3437 | | |
3427 | | - | |
| 3438 | + | |
3428 | 3439 | | |
3429 | 3440 | | |
3430 | 3441 | | |
| |||
3445 | 3456 | | |
3446 | 3457 | | |
3447 | 3458 | | |
3448 | | - | |
3449 | | - | |
| 3459 | + | |
3450 | 3460 | | |
3451 | 3461 | | |
3452 | 3462 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
740 | 740 | | |
741 | 741 | | |
742 | 742 | | |
| 743 | + | |
743 | 744 | | |
744 | 745 | | |
745 | 746 | | |
| |||
0 commit comments