aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorBart Van Assche <[email protected]>2021-08-09 16:03:04 -0700
committerMartin K. Petersen <[email protected]>2021-08-11 22:25:36 -0400
commit51f3a478892873337c54068d1185bcd797000a52 (patch)
tree2dfb7deb4b8dc178f4a799bdc4151bfe71254108 /tools/perf/scripts/python/bin
parent10163cee1f06fc2e17bcf7bbc2982337202d1d5c (diff)
scsi: core: Introduce the scsi_cmd_to_rq() function
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/[email protected] Cc: Christoph Hellwig <[email protected]> Cc: Hannes Reinecke <[email protected]> Cc: Ming Lei <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions