From 7cc7646b4b24430437e0cff104fadeafd470a7ce Mon Sep 17 00:00:00 2001 From: Jason Yan Date: Wed, 14 Dec 2022 21:38:07 +0800 Subject: 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 Signed-off-by: Jason Yan Reviewed-by: John Garry Signed-off-by: Martin K. Petersen --- include/scsi/sas_ata.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/scsi') 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_ */ -- cgit v1.2.3