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

scsi: ch: 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/20211222090311.916624-1-hch@lst.deSigned-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent b4cc0949
...@@ -239,7 +239,7 @@ ch_read_element_status(scsi_changer *ch, u_int elem, char *data) ...@@ -239,7 +239,7 @@ ch_read_element_status(scsi_changer *ch, u_int elem, char *data)
u_char *buffer; u_char *buffer;
int result; int result;
buffer = kmalloc(512, GFP_KERNEL | GFP_DMA); buffer = kmalloc(512, GFP_KERNEL);
if(!buffer) if(!buffer)
return -ENOMEM; return -ENOMEM;
...@@ -297,7 +297,7 @@ ch_readconfig(scsi_changer *ch) ...@@ -297,7 +297,7 @@ ch_readconfig(scsi_changer *ch)
int result,id,lun,i; int result,id,lun,i;
u_int elem; u_int elem;
buffer = kzalloc(512, GFP_KERNEL | GFP_DMA); buffer = kzalloc(512, GFP_KERNEL);
if (!buffer) if (!buffer)
return -ENOMEM; return -ENOMEM;
...@@ -783,7 +783,7 @@ static long ch_ioctl(struct file *file, ...@@ -783,7 +783,7 @@ static long ch_ioctl(struct file *file,
return -EINVAL; return -EINVAL;
elem = ch->firsts[cge.cge_type] + cge.cge_unit; elem = ch->firsts[cge.cge_type] + cge.cge_unit;
buffer = kmalloc(512, GFP_KERNEL | GFP_DMA); buffer = kmalloc(512, GFP_KERNEL);
if (!buffer) if (!buffer)
return -ENOMEM; return -ENOMEM;
mutex_lock(&ch->lock); mutex_lock(&ch->lock);
......
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