Hi John,

[auto build test ERROR on scsi/for-next -- if it's inappropriate base, please 
suggest rules for selecting the more suitable base]

url:    
https://github.com/0day-ci/linux/commits/John-Garry/HiSilicon-SAS-driver/20151012-231929
config: m68k-allmodconfig (attached as .config)
reproduce:
        wget 
https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross
 -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=m68k 

All error/warnings (new ones prefixed by >>):

   drivers/scsi/hisi_sas/hisi_sas_init.c: In function 'hisi_sas_alloc':
>> drivers/scsi/hisi_sas/hisi_sas_init.c:65:2: error: implicit declaration of 
>> function 'dma_pool_create' [-Werror=implicit-function-declaration]
     hisi_hba->status_buffer_pool = dma_pool_create(name,
     ^
>> drivers/scsi/hisi_sas/hisi_sas_init.c:65:31: warning: assignment makes 
>> pointer from integer without a cast
     hisi_hba->status_buffer_pool = dma_pool_create(name,
                                  ^
   drivers/scsi/hisi_sas/hisi_sas_init.c:73:31: warning: assignment makes 
pointer from integer without a cast
     hisi_hba->command_table_pool = dma_pool_create(name,
                                  ^
   drivers/scsi/hisi_sas/hisi_sas_init.c:115:26: warning: assignment makes 
pointer from integer without a cast
     hisi_hba->sge_page_pool = dma_pool_create(name, dev,
                             ^
   drivers/scsi/hisi_sas/hisi_sas_init.c: In function 'hisi_sas_free':
>> drivers/scsi/hisi_sas/hisi_sas_init.c:159:3: error: implicit declaration of 
>> function 'dma_pool_destroy' [-Werror=implicit-function-declaration]
      dma_pool_destroy(hisi_hba->status_buffer_pool);
      ^
   cc1: some warnings being treated as errors

vim +/dma_pool_create +65 drivers/scsi/hisi_sas/hisi_sas_init.c

    59                  memset(hisi_hba->complete_hdr[i], 0, s);
    60          }
    61  
    62          sprintf(name, "%s%d", "hisi_sas_status_buffer_pool",
    63                  hisi_hba->id);
    64          s = HISI_SAS_STATUS_BUF_SZ;
  > 65          hisi_hba->status_buffer_pool = dma_pool_create(name,
    66                                                         dev, s, 16, 0);
    67          if (!hisi_hba->status_buffer_pool)
    68                  goto err_out;
    69  
    70          sprintf(name, "%s%d", "hisi_sas_command_table_pool",
    71                  hisi_hba->id);
    72          s = HISI_SAS_COMMAND_TABLE_SZ;
  > 73          hisi_hba->command_table_pool = dma_pool_create(name,
    74                                                         dev, s, 16, 0);
    75          if (!hisi_hba->command_table_pool)
    76                  goto err_out;
    77  
    78          s = HISI_SAS_MAX_ITCT_ENTRIES * sizeof(struct hisi_sas_itct);
    79          hisi_hba->itct = dma_alloc_coherent(dev, s, &hisi_hba->itct_dma,
    80                                              GFP_KERNEL);
    81          if (!hisi_hba->itct)
    82                  goto err_out;
    83  
    84          memset(hisi_hba->itct, 0, s);
    85  
    86          hisi_hba->slot_info = devm_kcalloc(dev, 
HISI_SAS_COMMAND_ENTRIES,
    87                                             sizeof(struct hisi_sas_slot),
    88                                             GFP_KERNEL);
    89          if (!hisi_hba->slot_info)
    90                  goto err_out;
    91  
    92          s = HISI_SAS_COMMAND_ENTRIES * sizeof(struct hisi_sas_iost);
    93          hisi_hba->iost = dma_alloc_coherent(dev, s, &hisi_hba->iost_dma,
    94                                              GFP_KERNEL);
    95          if (!hisi_hba->iost)
    96                  goto err_out;
    97  
    98          memset(hisi_hba->iost, 0, s);
    99  
   100          s = HISI_SAS_COMMAND_ENTRIES * sizeof(struct 
hisi_sas_breakpoint);
   101          hisi_hba->breakpoint = dma_alloc_coherent(dev, s,
   102                                  &hisi_hba->breakpoint_dma, GFP_KERNEL);
   103          if (!hisi_hba->breakpoint)
   104                  goto err_out;
   105  
   106          memset(hisi_hba->breakpoint, 0, s);
   107  
   108          hisi_hba->slot_index_count = HISI_SAS_COMMAND_ENTRIES;
   109          s = hisi_hba->slot_index_count / sizeof(unsigned long);
   110          hisi_hba->slot_index_tags = devm_kzalloc(dev, s, GFP_KERNEL);
   111          if (!hisi_hba->slot_index_tags)
   112                  goto err_out;
   113  
   114          sprintf(name, "%s%d", "hisi_sas_status_sge_pool", hisi_hba->id);
   115          hisi_hba->sge_page_pool = dma_pool_create(name, dev,
   116                                  sizeof(struct hisi_sas_sge_page), 16, 
0);
   117          if (!hisi_hba->sge_page_pool)
   118                  goto err_out;
   119  
   120          s = sizeof(struct hisi_sas_initial_fis) * HISI_SAS_MAX_PHYS;
   121          hisi_hba->initial_fis = dma_alloc_coherent(dev, s,
   122                                  &hisi_hba->initial_fis_dma, GFP_KERNEL);
   123          if (!hisi_hba->initial_fis)
   124                  goto err_out;
   125          memset(hisi_hba->initial_fis, 0, s);
   126  
   127          s = HISI_SAS_COMMAND_ENTRIES * sizeof(struct 
hisi_sas_breakpoint) * 2;
   128          hisi_hba->sata_breakpoint = dma_alloc_coherent(dev, s,
   129                                  &hisi_hba->sata_breakpoint_dma, 
GFP_KERNEL);
   130          if (!hisi_hba->sata_breakpoint)
   131                  goto err_out;
   132          memset(hisi_hba->sata_breakpoint, 0, s);
   133  
   134          return 0;
   135  err_out:
   136          return -ENOMEM;
   137  }
   138  
   139  static void hisi_sas_free(struct hisi_hba *hisi_hba)
   140  {
   141          int i, s;
   142          struct device *dev = &hisi_hba->pdev->dev;
   143  
   144          for (i = 0; i < hisi_hba->queue_count; i++) {
   145                  s = sizeof(struct hisi_sas_cmd_hdr) * 
HISI_SAS_QUEUE_SLOTS;
   146                  if (hisi_hba->cmd_hdr[i])
   147                          dma_free_coherent(dev, s,
   148                                            hisi_hba->cmd_hdr[i],
   149                                            hisi_hba->cmd_hdr_dma[i]);
   150  
   151                  s = sizeof(struct hisi_sas_complete_hdr) * 
HISI_SAS_QUEUE_SLOTS;
   152                  if (hisi_hba->complete_hdr[i])
   153                          dma_free_coherent(dev, s,
   154                                            hisi_hba->complete_hdr[i],
   155                                            
hisi_hba->complete_hdr_dma[i]);
   156          }
   157  
   158          if (hisi_hba->status_buffer_pool)
 > 159                  dma_pool_destroy(hisi_hba->status_buffer_pool);
   160  
   161          if (hisi_hba->command_table_pool)
   162                  dma_pool_destroy(hisi_hba->command_table_pool);

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: Binary data

Reply via email to