]> git.ipfire.org Git - thirdparty/linux.git/commit
scsi: lpfc: Use the crc32c() function
authorEric Biggers <ebiggers@kernel.org>
Mon, 16 Mar 2026 22:36:31 +0000 (15:36 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 20 Mar 2026 01:46:49 +0000 (21:46 -0400)
commit48b2de8505437805116a3dc51d5afa09308c6659
tree6835833a5133ab8c647b9f32a99169da654157d8
parent98eff361647ecba893aadce8808729672604a102
scsi: lpfc: Use the crc32c() function

lpfc_cgn_calc_crc32(data, size, crc) is really just an open-coded version
of ~crc32c(bitrev32(crc), data, size).  However, all callers pass crc ==
~0, so it can be simplified even further to just ~crc32c(~0, data, size).
Remove the crc argument and implement it that way.

While we're at it, also use proper types in the function prototype.

Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Link: https://patch.msgid.link/20260316223631.72361-1-ebiggers@kernel.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/Kconfig
drivers/scsi/lpfc/lpfc.h
drivers/scsi/lpfc/lpfc_crtn.h
drivers/scsi/lpfc/lpfc_els.c
drivers/scsi/lpfc/lpfc_init.c