rakhisharma

Untitled

Feb 22nd, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.49 KB | None | 0 0
  1. root@anchal:/home/git/kernels/staging# make coccicheck MODE=patch
  2.  
  3. Please check for false positives in the output before submitting a patch.
  4. When using "patch" mode, carefully review the patch before submitting it.
  5.  
  6. diff -u -p a/drivers/dma/ioat/dma.c b/drivers/dma/ioat/dma.c
  7. --- a/drivers/dma/ioat/dma.c
  8. +++ b/drivers/dma/ioat/dma.c
  9. @@ -298,10 +298,9 @@ ioat_alloc_ring_ent(struct dma_chan *cha
  10. dma_addr_t phys;
  11.  
  12. ioat_dma = to_ioatdma_device(chan->device);
  13. - hw = pci_pool_alloc(ioat_dma->dma_pool, flags, &phys);
  14. + hw = pci_pool_zalloc(ioat_dma->dma_pool, flags, &phys);
  15. if (!hw)
  16. return NULL;
  17. - memset(hw, 0, sizeof(*hw));
  18.  
  19. desc = kmem_cache_zalloc(ioat_cache, flags);
  20. if (!desc) {
  21. diff -u -p a/drivers/dma/zx296702_dma.c b/drivers/dma/zx296702_dma.c
  22. --- a/drivers/dma/zx296702_dma.c
  23. +++ b/drivers/dma/zx296702_dma.c
  24. @@ -435,13 +435,12 @@ static struct zx_dma_desc_sw *zx_alloc_d
  25. if (!ds)
  26. return NULL;
  27.  
  28. - ds->desc_hw = dma_pool_alloc(d->pool, GFP_NOWAIT, &ds->desc_hw_lli);
  29. + ds->desc_hw = dma_pool_zalloc(d->pool, GFP_NOWAIT, &ds->desc_hw_lli);
  30. if (!ds->desc_hw) {
  31. dev_dbg(chan->device->dev, "vch %p: dma alloc fail\n", &c->vc);
  32. kfree(ds);
  33. return NULL;
  34. }
  35. - memset(ds->desc_hw, 0, sizeof(struct zx_desc_hw) * num);
  36. ds->desc_num = num;
  37. return ds;
  38. }
  39. diff -u -p a/drivers/scsi/hisi_sas/hisi_sas_main.c b/drivers/scsi/hisi_sas/hisi_sas_main.c
  40. --- a/drivers/scsi/hisi_sas/hisi_sas_main.c
  41. +++ b/drivers/scsi/hisi_sas/hisi_sas_main.c
  42. @@ -205,23 +205,21 @@ static int hisi_sas_task_prep(struct sas
  43. slot->port = port;
  44. task->lldd_task = slot;
  45.  
  46. - slot->status_buffer = dma_pool_alloc(hisi_hba->status_buffer_pool,
  47. - GFP_ATOMIC,
  48. - &slot->status_buffer_dma);
  49. + slot->status_buffer = dma_pool_zalloc(hisi_hba->status_buffer_pool,
  50. + GFP_ATOMIC,
  51. + &slot->status_buffer_dma);
  52. if (!slot->status_buffer) {
  53. rc = -ENOMEM;
  54. goto err_out_slot_buf;
  55. }
  56. - memset(slot->status_buffer, 0, HISI_SAS_STATUS_BUF_SZ);
  57.  
  58. - slot->command_table = dma_pool_alloc(hisi_hba->command_table_pool,
  59. - GFP_ATOMIC,
  60. - &slot->command_table_dma);
  61. + slot->command_table = dma_pool_zalloc(hisi_hba->command_table_pool,
  62. + GFP_ATOMIC,
  63. + &slot->command_table_dma);
  64. if (!slot->command_table) {
  65. rc = -ENOMEM;
  66. goto err_out_status_buf;
  67. }
  68. - memset(slot->command_table, 0, HISI_SAS_COMMAND_TABLE_SZ);
  69. memset(slot->cmd_hdr, 0, sizeof(struct hisi_sas_cmd_hdr));
  70.  
  71. switch (task->task_proto) {
Add Comment
Please, Sign In to add comment