kernel_samsung_a53x/include
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
..
acpi Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
asm-generic Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
clocksource Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
crypto Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drm drm: Stub out debug prints 2024-11-17 17:45:26 +01:00
dt-bindings Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
keys Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kunit Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kvm Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
linux fs: add ctime accessors infrastructure 2024-11-18 12:11:13 +01:00
math-emu Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
media Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
memory Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
misc Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
net netfilter: nf_tables: fix table flag updates 2024-11-18 11:43:32 +01:00
pcmcia Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ras Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
rdma Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsc Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
scsi scsi: core: Introduce the scsi_cmd_to_rq() function 2024-11-18 12:11:13 +01:00
sdp Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
soc exynos_pm_qos: Remove exynos_pm_qos_update_request_timeout() 2024-11-17 17:44:09 +01:00
sound ASoC: soc-card: Add storage for PCI SSID 2024-11-18 11:43:13 +01:00
target Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
test Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace neighbor: tracing: Move pin6 inside CONFIG_IPV6=y section 2024-11-08 11:26:11 +01:00
uapi netfilter: nf_tables: fix table flag updates 2024-11-18 11:43:32 +01:00
variant1/linux Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vdso Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
video Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xen Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00