Skip to content

Commit

Permalink
scsi: Add NO_DMA dummies for SCSI DMA mapping API
Browse files Browse the repository at this point in the history
Add dummies for scsi_dma_{,un}map(), to allow compile-testing if
NO_DMA=y.

This prevents the following from showing up later:

    ERROR: "scsi_dma_unmap" [drivers/firewire/firewire-sbp2.ko] undefined!
    ERROR: "scsi_dma_map" [drivers/firewire/firewire-sbp2.ko] undefined!

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: Mark Brown <broonie@kernel.org>
Acked-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
  • Loading branch information
Geert Uytterhoeven authored and Christoph Hellwig committed Mar 16, 2018
1 parent c1ce6c2 commit bff739b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions include/scsi/scsi_cmnd.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,13 @@ extern void scsi_kunmap_atomic_sg(void *virt);

extern int scsi_init_io(struct scsi_cmnd *cmd);

#ifdef CONFIG_SCSI_DMA
extern int scsi_dma_map(struct scsi_cmnd *cmd);
extern void scsi_dma_unmap(struct scsi_cmnd *cmd);
#else /* !CONFIG_SCSI_DMA */
static inline int scsi_dma_map(struct scsi_cmnd *cmd) { return -ENOSYS; }
static inline void scsi_dma_unmap(struct scsi_cmnd *cmd) { }
#endif /* !CONFIG_SCSI_DMA */

static inline unsigned scsi_sg_count(struct scsi_cmnd *cmd)
{
Expand Down

0 comments on commit bff739b

Please sign in to comment.