Use sgl_alloc_order() and sgl_free_order()
Subsystems (3)
cover Use sgl_alloc_order() and sgl_free_order()
Hello Martin,
In kernel v4.16-rc1 the functions sgl_alloc_order() and sgl_free_order() were introduced in lib/scatterlist.c. This patch series introduces these functions in the ipr and pmcraid SCSI drivers. Please consider these patches for kernel v4.17.
Thanks,
Bart.
Bart Van Assche (3):
scsi/ipr: Use sgl_alloc_order() and sgl_free_order() scsi/pmcraid: Remove an unused structure member scsi/pmcraid: Use sgl_alloc_order() and sgl_free_order()
drivers/scsi/Kconfig | 2 ++ drivers/scsi/ipr.c | 49 ++++++++----------------------------------------- drivers/scsi/ipr.h | 2 +- drivers/scsi/pmcraid.c | 43 ++++--------------------------------------- drivers/scsi/pmcraid.h | 3 +-- 5 files changed, 16 insertions(+), 83 deletions(-)
Signature · 1 line
2.16.1
PATCH 1/3 scsi/ipr: Use sgl_alloc_order() and sgl_free_order()
Use the sgl_alloc_order() and sgl_free_order() functions instead of open coding these functions.
--- drivers/scsi/Kconfig | 1 + drivers/scsi/ipr.c | 49 ++++++++----------------------------------------- drivers/scsi/ipr.h | 2 +- 3 files changed, 10 insertions(+), 42 deletions(-)
drivers/scsi/Kconfig +1 -0
@@ -1059,6 +1059,7 @@ config SCSI_IPR depends on PCI && SCSI && ATA select FW_LOADER select IRQ_POLL + select SGL_ALLOC ---help--- This driver supports the IBM Power Linux family RAID adapters. This includes IBM pSeries 5712, 5703, 5709, and 570A, as well
drivers/scsi/ipr.c +8 -41
74 lines not on this page · raw message
drivers/scsi/ipr.h +1 -1
@@ -1454,7 +1454,7 @@ struct ipr_sglist {u32 num_sg;u32 num_dma_sg;u32 buffer_len; -struct scatterlist scatterlist[1 ]; +struct scatterlist *scatterlist; };enum ipr_sdt_state {
Signature · 1 line
2.16.1
PATCH 2/3 scsi/pmcraid: Remove an unused structure member
In reply to Bart Van Assche--- drivers/scsi/pmcraid.h | 1 - 1 file changed, 1 deletion(-)
drivers/scsi/pmcraid.h +0 -1
@@ -542,7 +542,6 @@ struct pmcraid_sglist {u32 order;u32 num_sg;u32 num_dma_sg; -u32 buffer_len;struct scatterlist scatterlist[1 ]; };
Signature · 1 line
2.16.1
PATCH 3/3 scsi/pmcraid: Use sgl_alloc_order() and sgl_free_order()
In reply to Bart Van AsscheUse the sgl_alloc_order() and sgl_free_order() functions instead of open coding these functions.
--- drivers/scsi/Kconfig | 1 + drivers/scsi/pmcraid.c | 43 ++++--------------------------------------- drivers/scsi/pmcraid.h | 2 +- 3 files changed, 6 insertions(+), 40 deletions(-)
drivers/scsi/Kconfig +1 -0
@@ -1577,6 +1577,7 @@ config ZFCP config SCSI_PMCRAID tristate "PMC SIERRA Linux MaxRAID adapter support" depends on PCI && SCSI && NET + select SGL_ALLOC ---help--- This driver supports the PMC SIERRA MaxRAID adapters.
drivers/scsi/pmcraid.c +4 -39
66 lines not on this page · raw message
drivers/scsi/pmcraid.h +1 -1
@@ -542,7 +542,7 @@ struct pmcraid_sglist {u32 order;u32 num_sg;u32 num_dma_sg; -struct scatterlist scatterlist[1 ]; +struct scatterlist *scatterlist; };/* page D0 inquiry data of focal point resource */
Signature · 1 line
2.16.1
Martin K. Petersen
AppliedBart,
Quoted 4 lines
In kernel v4.16-rc1 the functions
sgl_alloc_order()andsgl_free_order()were introduced inlib/scatterlist.c. This patch series introduces these functions in the ipr and pmcraid SCSI drivers. Please consider these patches for kernel v4.17.
Applied to 4.17/scsi-queue, thanks!
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering