kernel_samsung_a53x/include/scsi
Bart Van Assche a173db1e08 scsi: core: Introduce the scsi_cmd_to_rq() function
[ Upstream commit 51f3a478892873337c54068d1185bcd797000a52 ]

The 'request' member of struct scsi_cmnd is superfluous. The struct request
and struct scsi_cmnd data structures are adjacent and hence the request
pointer can be derived easily from a scsi_cmnd pointer. Introduce a helper
function that performs that conversion in a type-safe way. This patch is
the first step towards removing the request member from struct
scsi_cmnd. Making that change has the following advantages:

 - This is a performance optimization since adding an offset to a pointer
   takes less time than dereferencing a pointer.

 - struct scsi_cmnd becomes smaller.

Link: https://lore.kernel.org/r/20210809230355.8186-2-bvanassche@acm.org
Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Stable-dep-of: 19597cad64d6 ("scsi: qla2xxx: Fix system crash due to bad pointer access")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-18 12:11:13 +01:00
..
fc Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fc_encode.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fc_frame.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fcoe_sysfs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
iscsi_if.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
iscsi_proto.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
iser.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
libfc.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
libfcoe.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
libiscsi.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
libiscsi_tcp.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
libsas.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sas.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sas_ata.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_bsg_iscsi.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_cmnd.h scsi: core: Introduce the scsi_cmd_to_rq() function 2024-11-18 12:11:13 +01:00
scsi_common.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_dbg.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_device.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_devinfo.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_dh.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_driver.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_eh.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_host.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_ioctl.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_proto.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_request.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_tcq.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_transport.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_transport_fc.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_transport_iscsi.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_transport_sas.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_transport_spi.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi_transport_srp.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsicam.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sg.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
srp.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
viosrp.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00