diff options
author | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> | 2020-03-26 16:58:17 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-03-26 10:28:20 -0600 |
commit | 2b384ede7107a528c65ec826e045b572bcb2aa0b (patch) | |
tree | 6590b738aed95ee3ef0747b53d7176991cd8191e /include/linux/libata.h | |
parent | 61a11986d33d01dbef745d49c0536961eb06d2f1 (diff) | |
download | lwn-2b384ede7107a528c65ec826e045b572bcb2aa0b.tar.gz lwn-2b384ede7107a528c65ec826e045b572bcb2aa0b.zip |
ata: move sata_deb_timing_*() to libata-sata.c
* move sata_deb_timing_*() to libata-sata.c
* add static inline for sata_ehc_deb_timing() for
CONFIG_SATA_HOST=n case
Code size savings on m68k arch using (modified) atari_defconfig:
text data bss dec hex filename
before:
32158 572 40 32770 8002 drivers/ata/libata-core.o
after:
32015 572 40 32627 7f73 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 'include/linux/libata.h')
-rw-r--r-- | include/linux/libata.h | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index 08fec96a6a1e..90c929b5df3d 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -1019,10 +1019,6 @@ struct ata_timing { /* * Core layer - drivers/ata/libata-core.c */ -extern const unsigned long sata_deb_timing_normal[]; -extern const unsigned long sata_deb_timing_hotplug[]; -extern const unsigned long sata_deb_timing_long[]; - extern struct ata_port_operations ata_dummy_port_ops; extern const struct ata_port_info ata_dummy_port_info; @@ -1060,15 +1056,6 @@ static inline int is_multi_taskfile(struct ata_taskfile *tf) (tf->command == ATA_CMD_WRITE_MULTI_FUA_EXT); } -static inline const unsigned long * -sata_ehc_deb_timing(struct ata_eh_context *ehc) -{ - if (ehc->i.flags & ATA_EHI_HOTPLUGGED) - return sata_deb_timing_hotplug; - else - return sata_deb_timing_normal; -} - static inline int ata_port_is_dummy(struct ata_port *ap) { return ap->ops == &ata_dummy_port_ops; @@ -1181,6 +1168,19 @@ extern void ata_scsi_cmd_error_handler(struct Scsi_Host *host, struct ata_port * * SATA specific code - drivers/ata/libata-sata.c */ #ifdef CONFIG_SATA_HOST +extern const unsigned long sata_deb_timing_normal[]; +extern const unsigned long sata_deb_timing_hotplug[]; +extern const unsigned long sata_deb_timing_long[]; + +static inline const unsigned long * +sata_ehc_deb_timing(struct ata_eh_context *ehc) +{ + if (ehc->i.flags & ATA_EHI_HOTPLUGGED) + return sata_deb_timing_hotplug; + else + return sata_deb_timing_normal; +} + extern int sata_scr_valid(struct ata_link *link); extern int sata_scr_read(struct ata_link *link, int reg, u32 *val); extern int sata_scr_write(struct ata_link *link, int reg, u32 val); @@ -1192,6 +1192,11 @@ extern int sata_link_hardreset(struct ata_link *link, extern int sata_link_resume(struct ata_link *link, const unsigned long *params, unsigned long deadline); #else +static inline const unsigned long * +sata_ehc_deb_timing(struct ata_eh_context *ehc) +{ + return NULL; +} static inline int sata_scr_valid(struct ata_link *link) { return 0; } static inline int sata_scr_read(struct ata_link *link, int reg, u32 *val) { |