Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- root@anchal:/home/git/kernels/staging# make coccicheck MODE=patch
- Please check for false positives in the output before submitting a patch.
- When using "patch" mode, carefully review the patch before submitting it.
- diff -u -p a/drivers/dma/ioat/dma.c b/drivers/dma/ioat/dma.c
- --- a/drivers/dma/ioat/dma.c
- +++ b/drivers/dma/ioat/dma.c
- @@ -298,10 +298,9 @@ ioat_alloc_ring_ent(struct dma_chan *cha
- dma_addr_t phys;
- ioat_dma = to_ioatdma_device(chan->device);
- - hw = pci_pool_alloc(ioat_dma->dma_pool, flags, &phys);
- + hw = pci_pool_zalloc(ioat_dma->dma_pool, flags, &phys);
- if (!hw)
- return NULL;
- - memset(hw, 0, sizeof(*hw));
- desc = kmem_cache_zalloc(ioat_cache, flags);
- if (!desc) {
- diff -u -p a/drivers/dma/zx296702_dma.c b/drivers/dma/zx296702_dma.c
- --- a/drivers/dma/zx296702_dma.c
- +++ b/drivers/dma/zx296702_dma.c
- @@ -435,13 +435,12 @@ static struct zx_dma_desc_sw *zx_alloc_d
- if (!ds)
- return NULL;
- - ds->desc_hw = dma_pool_alloc(d->pool, GFP_NOWAIT, &ds->desc_hw_lli);
- + ds->desc_hw = dma_pool_zalloc(d->pool, GFP_NOWAIT, &ds->desc_hw_lli);
- if (!ds->desc_hw) {
- dev_dbg(chan->device->dev, "vch %p: dma alloc fail\n", &c->vc);
- kfree(ds);
- return NULL;
- }
- - memset(ds->desc_hw, 0, sizeof(struct zx_desc_hw) * num);
- ds->desc_num = num;
- return ds;
- }
- diff -u -p a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c
- --- a/drivers/scsi/hisi_sas/hisi_sas_main.c
- +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c
- @@ -205,23 +205,21 @@ static int hisi_sas_task_prep(struct sas
- slot->port = port;
- task->lldd_task = slot;
- - slot->status_buffer = dma_pool_alloc(hisi_hba->status_buffer_pool,
- - GFP_ATOMIC,
- - &slot->status_buffer_dma);
- + slot->status_buffer = dma_pool_zalloc(hisi_hba->status_buffer_pool,
- + GFP_ATOMIC,
- + &slot->status_buffer_dma);
- if (!slot->status_buffer) {
- rc = -ENOMEM;
- goto err_out_slot_buf;
- }
- - memset(slot->status_buffer, 0, HISI_SAS_STATUS_BUF_SZ);
- - slot->command_table = dma_pool_alloc(hisi_hba->command_table_pool,
- - GFP_ATOMIC,
- - &slot->command_table_dma);
- + slot->command_table = dma_pool_zalloc(hisi_hba->command_table_pool,
- + GFP_ATOMIC,
- + &slot->command_table_dma);
- if (!slot->command_table) {
- rc = -ENOMEM;
- goto err_out_status_buf;
- }
- - memset(slot->command_table, 0, HISI_SAS_COMMAND_TABLE_SZ);
- memset(slot->cmd_hdr, 0, sizeof(struct hisi_sas_cmd_hdr));
- switch (task->task_proto) {
Add Comment
Please, Sign In to add comment