diff mbox series

[1/2] libata: provide a ata_scsi_dma_need_drain stub for !CONFIG_ATA

Message ID 20200615064624.37317-2-hch@lst.de
State Not Applicable
Delegated to: David Miller
Headers show
Series [1/2] libata: provide a ata_scsi_dma_need_drain stub for !CONFIG_ATA | expand

Commit Message

Christoph Hellwig June 15, 2020, 6:46 a.m. UTC
SAS drivers can be compiled with ata support disabled.  Provide a
stub so that the drivers don't have to ifdef around wiring up
ata_scsi_dma_need_drain.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 include/linux/libata.h | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Martin K. Petersen June 16, 2020, 3:46 a.m. UTC | #1
On Mon, 15 Jun 2020 08:46:23 +0200, Christoph Hellwig wrote:

> SAS drivers can be compiled with ata support disabled.  Provide a
> stub so that the drivers don't have to ifdef around wiring up
> ata_scsi_dma_need_drain.

Applied to 5.8/scsi-fixes, thanks!

[1/2] scsi: libata: Provide an ata_scsi_dma_need_drain stub for !CONFIG_ATA
      https://git.kernel.org/mkp/scsi/c/7bb7ee8704fe
[2/2] scsi: Wire up ata_scsi_dma_need_drain for SAS HBA drivers
      https://git.kernel.org/mkp/scsi/c/b8f1d1e05817
diff mbox series

Patch

diff --git a/include/linux/libata.h b/include/linux/libata.h
index af832852e62044..042e584daca73e 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -1092,7 +1092,11 @@  extern int ata_scsi_ioctl(struct scsi_device *dev, unsigned int cmd,
 #define ATA_SCSI_COMPAT_IOCTL /* empty */
 #endif
 extern int ata_scsi_queuecmd(struct Scsi_Host *h, struct scsi_cmnd *cmd);
+#if IS_ENABLED(CONFIG_ATA)
 bool ata_scsi_dma_need_drain(struct request *rq);
+#else
+#define ata_scsi_dma_need_drain NULL
+#endif
 extern int ata_sas_scsi_ioctl(struct ata_port *ap, struct scsi_device *dev,
 			    unsigned int cmd, void __user *arg);
 extern bool ata_link_online(struct ata_link *link);