diff mbox series

[v2,15/15] scsi: Remove scsi_execute_req/scsi_execute functions

Message ID 20221209061325.705999-16-michael.christie@oracle.com (mailing list archive)
State Superseded
Headers show
Series scsi: Add struct for args to execution functions | expand

Commit Message

Mike Christie Dec. 9, 2022, 6:13 a.m. UTC
scsi_execute and scsi_execute_req are no longer used so remove them.

Signed-off-by: Mike Christie <michael.christie@oracle.com>
---
 include/scsi/scsi_device.h | 33 ---------------------------------
 1 file changed, 33 deletions(-)

Comments

John Garry Dec. 9, 2022, 10:23 a.m. UTC | #1
On 09/12/2022 06:13, Mike Christie wrote:
> scsi_execute and scsi_execute_req are no longer used so remove them.
> 
> Signed-off-by: Mike Christie<michael.christie@oracle.com>
> ---

FWIW:

Reviewed-by: John Garry <john.g.garry@oracle.com>
Bart Van Assche Dec. 12, 2022, 9:31 p.m. UTC | #2
On 12/8/22 22:13, Mike Christie wrote:
> scsi_execute and scsi_execute_req are no longer used so remove them.

Reviewed-by: Bart Van Assche <bvanassche@acm.org>
diff mbox series

Patch

diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
index eb960aa73b3b..9ed264ad3fa8 100644
--- a/include/scsi/scsi_device.h
+++ b/include/scsi/scsi_device.h
@@ -487,39 +487,6 @@  int __scsi_execute(struct scsi_device *sdev, const unsigned char *cmd,
 		       retries, exec_args);				\
 })
 
-/* Make sure any sense buffer is the correct size. */
-#define scsi_execute(_sdev, _cmd, _data_dir, _buffer, _bufflen, _sense,	\
-		     _sshdr, _timeout, _retries, _flags, _rq_flags,	\
-		     _resid)						\
-({									\
-	BUILD_BUG_ON((_sense) != NULL &&				\
-		     sizeof(_sense) != SCSI_SENSE_BUFFERSIZE);		\
-	__scsi_execute(_sdev, _cmd, (_data_dir == DMA_TO_DEVICE ?	\
-		       REQ_OP_DRV_OUT : REQ_OP_DRV_IN) | _flags,	\
-		       _buffer, _bufflen, _timeout, _retries,	\
-		       (struct scsi_exec_args) {			\
-				.sense = _sense,			\
-				.sshdr = _sshdr,			\
-				.req_flags = _rq_flags & RQF_PM  ?	\
-						BLK_MQ_REQ_PM : 0,	\
-				.resid = _resid,			\
-		       });						\
-})
-
-static inline int scsi_execute_req(struct scsi_device *sdev,
-	const unsigned char *cmd, int data_direction, void *buffer,
-	unsigned bufflen, struct scsi_sense_hdr *sshdr, int timeout,
-	int retries, int *resid)
-{
-	return __scsi_execute(sdev, cmd,
-			      data_direction == DMA_TO_DEVICE ?
-			      REQ_OP_DRV_OUT : REQ_OP_DRV_IN, buffer,
-			      bufflen, timeout, retries,
-			      (struct scsi_exec_args) {
-					.sshdr = sshdr,
-					.resid = resid,
-			      });
-}
 extern void sdev_disable_disk_events(struct scsi_device *sdev);
 extern void sdev_enable_disk_events(struct scsi_device *sdev);
 extern int scsi_vpd_lun_id(struct scsi_device *, char *, size_t);