diff options
author | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> | 2020-03-26 16:58:13 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-03-26 17:28:19 +0100 |
commit | ab4117cf2470618ffd5af16fa7c363b81260d6e7 (patch) | |
tree | 75cd385617b052edad3837135b6ab6523c9a8d5f /drivers/ata/libata.h | |
parent | ata: move sata_scr_*() to libata-sata.c (diff) | |
download | linux-ab4117cf2470618ffd5af16fa7c363b81260d6e7.tar.xz linux-ab4117cf2470618ffd5af16fa7c363b81260d6e7.zip |
ata: move *sata_set_spd*() to libata-sata.c
* move *sata_set_spd*() to libata-sata.c
* add static inlines for CONFIG_SATA_HOST=n case
Code size savings on m68k arch using (modified) atari_defconfig:
text data bss dec hex filename
before:
32842 572 40 33458 82ae drivers/ata/libata-core.o
after:
32812 572 40 33428 8290 drivers/ata/libata-core.o
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/ata/libata.h')
-rw-r--r-- | drivers/ata/libata.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/ata/libata.h b/drivers/ata/libata.h index cd8090ad43e5..53b45ebe3d55 100644 --- a/drivers/ata/libata.h +++ b/drivers/ata/libata.h @@ -87,6 +87,13 @@ extern unsigned int ata_read_log_page(struct ata_device *dev, u8 log, #define to_ata_port(d) container_of(d, struct ata_port, tdev) +/* libata-sata.c */ +#ifdef CONFIG_SATA_HOST +int sata_set_spd_needed(struct ata_link *link); +#else +static inline int sata_set_spd_needed(struct ata_link *link) { return 1; } +#endif + /* libata-acpi.c */ #ifdef CONFIG_ATA_ACPI extern unsigned int ata_acpi_gtf_filter; |