diff options
author | Jason Yan <yanaijie@huawei.com> | 2022-12-14 21:38:07 +0800 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2022-12-30 16:59:11 +0000 |
commit | 7cc7646b4b24430437e0cff104fadeafd470a7ce (patch) | |
tree | bb12ab1806c9133d1ecb7df0b9ba39d1bfb2af82 /include | |
parent | 8d2c9d25b725a699479d388da7e116d1d2bc0ea1 (diff) | |
download | linux-stable-7cc7646b4b24430437e0cff104fadeafd470a7ce.tar.gz linux-stable-7cc7646b4b24430437e0cff104fadeafd470a7ce.tar.bz2 linux-stable-7cc7646b4b24430437e0cff104fadeafd470a7ce.zip |
scsi: libsas: Factor out sas_ata_add_dev()
Factor out sas_ata_add_dev() and put it in sas_ata.c since it is a SATA
related interface. Also follow the standard coding style to define an
inline empty function when CONFIG_SCSI_SAS_ATA is not enabled.
Cc: John Garry <john.g.garry@oracle.com>
Signed-off-by: Jason Yan <yanaijie@huawei.com>
Reviewed-by: John Garry <john.g.garry@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/scsi/sas_ata.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/scsi/sas_ata.h b/include/scsi/sas_ata.h index 606b4496ecaf..2f8c719840a6 100644 --- a/include/scsi/sas_ata.h +++ b/include/scsi/sas_ata.h @@ -37,6 +37,8 @@ int sas_execute_ata_cmd(struct domain_device *device, u8 *fis, int force_phy_id); int smp_ata_check_ready_type(struct ata_link *link); int sas_discover_sata(struct domain_device *dev); +int sas_ata_add_dev(struct domain_device *parent, struct ex_phy *phy, + struct domain_device *child, int phy_id); #else static inline void sas_ata_disabled_notice(void) @@ -114,6 +116,13 @@ static inline int sas_discover_sata(struct domain_device *dev) sas_ata_disabled_notice(); return -ENXIO; } + +static inline int sas_ata_add_dev(struct domain_device *parent, struct ex_phy *phy, + struct domain_device *child, int phy_id) +{ + sas_ata_disabled_notice(); + return -ENODEV; +} #endif #endif /* _SAS_ATA_H_ */ |