[PATCH v3 0/2] scsi: Use vmalloc_array and vcalloc to simplify code

Qianfeng Rong posted 2 patches 1 month, 4 weeks ago
drivers/scsi/ipr.c        | 8 ++++----
drivers/scsi/scsi_debug.c | 6 ++----
2 files changed, 6 insertions(+), 8 deletions(-)
[PATCH v3 0/2] scsi: Use vmalloc_array and vcalloc to simplify code
Posted by Qianfeng Rong 1 month, 4 weeks ago
Instead of using array_size, use a function that takes care of both the
multiplication and the overflow checks.

Compile-tested only.

Qianfeng Rong (2):
  scsi: ipr: Use vmalloc_array to simplify code
  scsi: scsi_debug: Use vcalloc to simplify code

 drivers/scsi/ipr.c        | 8 ++++----
 drivers/scsi/scsi_debug.c | 6 ++----
 2 files changed, 6 insertions(+), 8 deletions(-)

-- 
2.34.1
Re: [PATCH v3 0/2] scsi: Use vmalloc_array and vcalloc to simplify code
Posted by Martin K. Petersen 1 month, 2 weeks ago
Qianfeng,

> Instead of using array_size, use a function that takes care of both
> the multiplication and the overflow checks.

Applied to 6.18/scsi-staging, thanks!

-- 
Martin K. Petersen