mbox series

[v4,0/9] ata,libsas: Assign the unique id used for printing earlier

Message ID 20240703184418.723066-11-cassel@kernel.org
Headers show
Series ata,libsas: Assign the unique id used for printing earlier | expand

Message

Niklas Cassel July 3, 2024, 6:44 p.m. UTC
Hello all,

This series moves the assignment of ap->print_id, which is used as a
unique id for each port, earlier, such that we can use the ata_port_*
print functions even before the ata_host has been registered.

While the patch series was orginally meant to simply assign a unique
id used for printing earlier (ap->print_id), it has since grown to
also include cleanups related to ata_port_alloc() (since ap->print_id
is now assigned in ata_port_alloc()).


Kind regards,
Niklas


Changes since v3:
-Picked up tags.
-Clarified commit message, and avoid word useless, for patch
 "ata,scsi: Remove wrappers ata_sas_tport_{add,delete}()"
-Clarified commit message, and avoid word useless, for patch
 "ata,scsi: Remove wrapper ata_sas_port_alloc()"
-Remove superfluous sata_port_info struct, as it is not strictly needed
 anymore, and instead perform the initializations directly in
 sas_ata_init().


Link to v3:
https://lore.kernel.org/linux-ide/20240702160756.596955-11-cassel@kernel.org/

Link to v2:
https://lore.kernel.org/linux-ide/20240626180031.4050226-15-cassel@kernel.org/

Link to v1:
https://lore.kernel.org/linux-ide/20240618153537.2687621-7-cassel@kernel.org/

Niklas Cassel (9):
  ata,scsi: Remove wrappers ata_sas_tport_{add,delete}()
  ata: libata: Remove unused function declaration for ata_scsi_detect()
  ata: libata-core: Remove support for decreasing the number of ports
  ata: libata-sata: Remove superfluous assignment in
    ata_sas_port_alloc()
  ata: libata-core: Remove local_port_no struct member
  ata: libata: Assign print_id at port allocation time
  ata: libata-core: Reuse available ata_port print_ids
  ata,scsi: Remove wrapper ata_sas_port_alloc()
  ata: ahci: Add debug print for external port

 drivers/ata/ahci.c                 |  4 ++-
 drivers/ata/libata-core.c          | 41 +++++++++----------------
 drivers/ata/libata-sata.c          | 49 ------------------------------
 drivers/ata/libata-transport.c     |  5 ++-
 drivers/ata/libata-transport.h     |  3 --
 drivers/ata/libata.h               |  2 --
 drivers/scsi/libsas/sas_ata.c      | 22 ++++++--------
 drivers/scsi/libsas/sas_discover.c |  2 +-
 include/linux/libata.h             | 11 +++----
 9 files changed, 37 insertions(+), 102 deletions(-)

Comments

Martin K. Petersen July 4, 2024, 3:05 a.m. UTC | #1
Niklas,

> This series moves the assignment of ap->print_id, which is used as a
> unique id for each port, earlier, such that we can use the ata_port_*
> print functions even before the ata_host has been registered.
>
> While the patch series was orginally meant to simply assign a unique
> id used for printing earlier (ap->print_id), it has since grown to
> also include cleanups related to ata_port_alloc() (since ap->print_id
> is now assigned in ata_port_alloc()).

Looks good to me.

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Niklas Cassel July 4, 2024, 10:02 a.m. UTC | #2
On Wed, 03 Jul 2024 20:44:17 +0200, Niklas Cassel wrote:
> This series moves the assignment of ap->print_id, which is used as a
> unique id for each port, earlier, such that we can use the ata_port_*
> print functions even before the ata_host has been registered.
> 
> While the patch series was orginally meant to simply assign a unique
> id used for printing earlier (ap->print_id), it has since grown to
> also include cleanups related to ata_port_alloc() (since ap->print_id
> is now assigned in ata_port_alloc()).
> 
> [...]

Applied to libata/linux.git (for-6.11), thanks!

[1/9] ata,scsi: Remove wrappers ata_sas_tport_{add,delete}()
      https://git.kernel.org/libata/linux/c/c10bc561
[2/9] ata: libata: Remove unused function declaration for ata_scsi_detect()
      https://git.kernel.org/libata/linux/c/2199d6ff
[3/9] ata: libata-core: Remove support for decreasing the number of ports
      https://git.kernel.org/libata/linux/c/23262cce
[4/9] ata: libata-sata: Remove superfluous assignment in ata_sas_port_alloc()
      https://git.kernel.org/libata/linux/c/6933eb8e
[5/9] ata: libata-core: Remove local_port_no struct member
      https://git.kernel.org/libata/linux/c/1dd63a6b
[6/9] ata: libata: Assign print_id at port allocation time
      https://git.kernel.org/libata/linux/c/1c1fbb86
[7/9] ata: libata-core: Reuse available ata_port print_ids
      https://git.kernel.org/libata/linux/c/1228713c
[8/9] ata,scsi: Remove wrapper ata_sas_port_alloc()
      https://git.kernel.org/libata/linux/c/0d3603ac
[9/9] ata: ahci: Add debug print for external port
      https://git.kernel.org/libata/linux/c/f97106b1

Kind regards,
Niklas