summaryrefslogtreecommitdiffstats
path: root/include/scsi
diff options
context:
space:
mode:
authorMartin K. Petersen <martin.petersen@oracle.com>2022-12-30 16:59:30 +0000
committerMartin K. Petersen <martin.petersen@oracle.com>2022-12-30 16:59:30 +0000
commit1e49a5387f43e74c5408187d74038ef942a3eb34 (patch)
treec2ef4336d2e14fb6ce7edf244fa887500c80e7de /include/scsi
parent1b929c02afd37871d5afb9d498426f83432e71c2 (diff)
parent5d39b77c33b19089351f74a524fbb828c7d8ba81 (diff)
downloadlinux-stable-1e49a5387f43e74c5408187d74038ef942a3eb34.tar.gz
linux-stable-1e49a5387f43e74c5408187d74038ef942a3eb34.tar.bz2
linux-stable-1e49a5387f43e74c5408187d74038ef942a3eb34.zip
Merge patch series "scsi: libsas: Some coding style fixes and cleanups"
Jason Yan <yanaijie@huawei.com> says: A few coding style fixes and cleanups. There should be no functional changes in this series besides the debug log prints. Link: https://lore.kernel.org/r/20221214133808.1649122-1-yanaijie@huawei.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/libsas.h1
-rw-r--r--include/scsi/sas_ata.h20
2 files changed, 20 insertions, 1 deletions
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h
index 1aee3d0ebbb2..159823e0afbf 100644
--- a/include/scsi/libsas.h
+++ b/include/scsi/libsas.h
@@ -735,7 +735,6 @@ void sas_unregister_domain_devices(struct asd_sas_port *port, int gone);
void sas_init_disc(struct sas_discovery *disc, struct asd_sas_port *);
void sas_discover_event(struct asd_sas_port *, enum discover_event ev);
-int sas_discover_sata(struct domain_device *);
int sas_discover_end_dev(struct domain_device *);
void sas_unregister_dev(struct asd_sas_port *port, struct domain_device *);
diff --git a/include/scsi/sas_ata.h b/include/scsi/sas_ata.h
index 9c927d46f136..2f8c719840a6 100644
--- a/include/scsi/sas_ata.h
+++ b/include/scsi/sas_ata.h
@@ -36,8 +36,15 @@ void sas_ata_device_link_abort(struct domain_device *dev, bool force_reset);
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)
+{
+ pr_notice_once("ATA device seen but CONFIG_SCSI_SAS_ATA=N\n");
+}
static inline int dev_is_sata(struct domain_device *dev)
{
@@ -103,6 +110,19 @@ static inline int smp_ata_check_ready_type(struct ata_link *link)
{
return 0;
}
+
+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_ */