libata: cleanup ata_dev_configure()
authorDamien Le Moal <damien.lemoal@wdc.com>
Mon, 16 Aug 2021 01:44:50 +0000 (10:44 +0900)
committerJens Axboe <axboe@kernel.dk>
Wed, 18 Aug 2021 13:19:39 +0000 (07:19 -0600)
commit891fd7c61952ed3fddb82a3b00ae4b3edfce8733
tree8183cbd8b6c50428425f5147209edb0091c22087
parentd8d8778c24cc4689250b59c426489a360032d912
libata: cleanup ata_dev_configure()

Introduce the helper functions ata_dev_config_lba() and
ata_dev_config_chs() to configure the addressing capabilities of a
device. To control message printing in these new helpers, as well as
in ata_dev_configure() and in ata_hpa_resize(), add the helper function
ata_dev_print_info() to avoid open coding for the eh context
ATA_EHI_PRINTINFO flag in multiple functions.

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Link: https://lore.kernel.org/r/20210816014456.2191776-6-damien.lemoal@wdc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/ata/libata-core.c