diff options
author | Martin K. Petersen <martin.petersen@oracle.com> | 2022-12-30 19:59:30 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2022-12-30 19:59:30 +0300 |
commit | 1e49a5387f43e74c5408187d74038ef942a3eb34 (patch) | |
tree | c2ef4336d2e14fb6ce7edf244fa887500c80e7de /include/scsi | |
parent | 1b929c02afd37871d5afb9d498426f83432e71c2 (diff) | |
parent | 5d39b77c33b19089351f74a524fbb828c7d8ba81 (diff) | |
download | linux-1e49a5387f43e74c5408187d74038ef942a3eb34.tar.xz |
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.h | 1 | ||||
-rw-r--r-- | include/scsi/sas_ata.h | 20 |
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_ */ |