Commit 23262cc
committed
ata: libata-core: Remove support for decreasing the number of ports
Commit f318719 ("libata: separate out ata_host_alloc() and
ata_host_register()") added ata_host_alloc(), where the API allowed
a LLD to overallocate the number of ports supplied to ata_host_alloc(),
as long as the LLD decreased host->n_ports before calling
ata_host_register().
However, this functionally has never ever been used by a single LLD.
Because of the current API design, the assignment of ap->print_id is
deferred until registration time, which is bad, because that means that
the ata_port_*() print functions cannot be used by a LLD until after
registration time, which means that a LLD is forced to use a print
function that is non-port specific, even for a port specific error.
Remove the support for decreasing the number of ports, such that it will
be possible to assign ap->print_id earlier.
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Link: https://lore.kernel.org/r/20240703184418.723066-14-cassel@kernel.org
Signed-off-by: Niklas Cassel <cassel@kernel.org>1 parent 2199d6f commit 23262cc
2 files changed
Lines changed: 6 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5555 | 5555 | | |
5556 | 5556 | | |
5557 | 5557 | | |
5558 | | - | |
| 5558 | + | |
5559 | 5559 | | |
5560 | 5560 | | |
5561 | 5561 | | |
5562 | 5562 | | |
5563 | 5563 | | |
5564 | | - | |
5565 | | - | |
5566 | | - | |
5567 | | - | |
5568 | | - | |
5569 | 5564 | | |
5570 | 5565 | | |
5571 | 5566 | | |
5572 | 5567 | | |
5573 | 5568 | | |
5574 | 5569 | | |
5575 | | - | |
| 5570 | + | |
5576 | 5571 | | |
5577 | 5572 | | |
5578 | 5573 | | |
5579 | 5574 | | |
5580 | 5575 | | |
5581 | 5576 | | |
5582 | 5577 | | |
5583 | | - | |
| 5578 | + | |
5584 | 5579 | | |
5585 | 5580 | | |
5586 | 5581 | | |
| |||
5600 | 5595 | | |
5601 | 5596 | | |
5602 | 5597 | | |
5603 | | - | |
| 5598 | + | |
5604 | 5599 | | |
5605 | 5600 | | |
5606 | 5601 | | |
5607 | | - | |
| 5602 | + | |
5608 | 5603 | | |
5609 | 5604 | | |
5610 | 5605 | | |
| |||
5913 | 5908 | | |
5914 | 5909 | | |
5915 | 5910 | | |
5916 | | - | |
5917 | | - | |
5918 | | - | |
5919 | | - | |
5920 | | - | |
5921 | | - | |
5922 | | - | |
5923 | 5911 | | |
5924 | 5912 | | |
5925 | 5913 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1069 | 1069 | | |
1070 | 1070 | | |
1071 | 1071 | | |
1072 | | - | |
| 1072 | + | |
1073 | 1073 | | |
1074 | 1074 | | |
1075 | 1075 | | |
| |||
0 commit comments