Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: vmw_pvscsi: No need to clear memory after a dma_alloc_coherent() call

dma_alloc_coherent() already clear the allocated memory, there is no need
to explicitly call memset().

Since 'config_page' and 'header' are the same, a memset() call can be
avoided.

Link: https://lore.kernel.org/r/cd1220c628c89465dcfcbf4aa9bd53110898a529.1648067518.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Christophe JAILLET and committed by
Martin K. Petersen
0848ccae 9ad659be

-1
-1
drivers/scsi/vmw_pvscsi.c
··· 1324 1324 * indicate success. 1325 1325 */ 1326 1326 header = config_page; 1327 - memset(header, 0, sizeof *header); 1328 1327 header->hostStatus = BTSTAT_INVPARAM; 1329 1328 header->scsiStatus = SDSTAT_CHECK; 1330 1329