path: root/include/linux/libata.h
diff options
authorBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2020-03-26 16:58:18 +0100
committerJens Axboe <axboe@kernel.dk>2020-03-26 10:28:20 -0600
commitec811a94c5bb6916d01c02dc99c8cecfa59cbb85 (patch)
tree90efed394ceb64ea86fd83348db36a8469465f70 /include/linux/libata.h
parentata: move sata_deb_timing_*() to libata-sata.c (diff)
ata: start separating SATA specific code from libata-scsi.c
Start separating SATA specific code from libata-scsi.c: * un-static ata_scsi_find_dev() * move following code to libata-sata.c: - SATA only sysfs device attributes handling - __ata_change_queue_depth() - ata_scsi_change_queue_depth() * cover with CONFIG_SATA_HOST ifdef SATA only sysfs device attributes handling code and ATA_SHT_NCQ() macro in <linux/libata.h> Code size savings on m68k arch using (modified) atari_defconfig: text data bss dec hex filename before: 20702 105 576 21383 5387 drivers/ata/libata-scsi.o after: 19137 23 576 19736 4d18 drivers/ata/libata-scsi.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')
1 files changed, 7 insertions, 2 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 90c929b5df3d..ae74fd048a32 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -530,12 +530,14 @@ typedef int (*ata_reset_fn_t)(struct ata_link *link, unsigned int *classes,
unsigned long deadline);
typedef void (*ata_postreset_fn_t)(struct ata_link *link, unsigned int *classes);
-extern struct device_attribute dev_attr_link_power_management_policy;
extern struct device_attribute dev_attr_unload_heads;
+extern struct device_attribute dev_attr_link_power_management_policy;
extern struct device_attribute dev_attr_ncq_prio_enable;
extern struct device_attribute dev_attr_em_message_type;
extern struct device_attribute dev_attr_em_message;
extern struct device_attribute dev_attr_sw_activity;
enum sw_activity {
@@ -1371,7 +1373,6 @@ extern int ata_link_nr_enabled(struct ata_link *link);
extern const struct ata_port_operations ata_base_port_ops;
extern const struct ata_port_operations sata_port_ops;
extern struct device_attribute *ata_common_sdev_attrs[];
-extern struct device_attribute *ata_ncq_sdev_attrs[];
* All sht initializers (BASE, PIO, BMDMA, NCQ) must be instantiated
@@ -1399,10 +1400,14 @@ extern struct device_attribute *ata_ncq_sdev_attrs[];
__ATA_BASE_SHT(drv_name), \
.sdev_attrs = ata_common_sdev_attrs
+extern struct device_attribute *ata_ncq_sdev_attrs[];
#define ATA_NCQ_SHT(drv_name) \
__ATA_BASE_SHT(drv_name), \
.sdev_attrs = ata_ncq_sdev_attrs, \
.change_queue_depth = ata_scsi_change_queue_depth
* PMP helpers