Commit d94d9496 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Martin K. Petersen

scsi: sr: Don't use GFP_DMA

The allocated buffers are used as a command payload, for which the block
layer and/or DMA API do the proper bounce buffering if needed.

Link: https://lore.kernel.org/r/20211222090842.920724-1-hch@lst.deReported-by: default avatarBaoquan He <bhe@redhat.com>
Reviewed-by: default avatarBaoquan He <bhe@redhat.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent bc7806b3
......@@ -856,7 +856,7 @@ static void get_capabilities(struct scsi_cd *cd)
/* allocate transfer buffer */
buffer = kmalloc(512, GFP_KERNEL | GFP_DMA);
buffer = kmalloc(512, GFP_KERNEL);
if (!buffer) {
sr_printk(KERN_ERR, cd, "out of memory.\n");
return;
......
......@@ -131,7 +131,7 @@ int sr_set_blocklength(Scsi_CD *cd, int blocklength)
if (cd->vendor == VENDOR_TOSHIBA)
density = (blocklength > 2048) ? 0x81 : 0x83;
buffer = kmalloc(512, GFP_KERNEL | GFP_DMA);
buffer = kmalloc(512, GFP_KERNEL);
if (!buffer)
return -ENOMEM;
......@@ -179,7 +179,7 @@ int sr_cd_check(struct cdrom_device_info *cdi)
if (cd->cdi.mask & CDC_MULTI_SESSION)
return 0;
buffer = kmalloc(512, GFP_KERNEL | GFP_DMA);
buffer = kmalloc(512, GFP_KERNEL);
if (!buffer)
return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment