Hi Andy,

I love your patch! Yet something to improve:

[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on v5.0 next-20190301]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:    
https://github.com/0day-ci/linux/commits/Andy-Shevchenko/drm-selftests-mm-Switch-to-bitmap_zalloc/20190304-183335
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 8.2.0
reproduce:
        wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=8.2.0 make.cross ARCH=xtensa 

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

   drivers/gpu//drm/selftests/test-drm_mm.c: In function 'igt_bottomup':
>> drivers/gpu//drm/selftests/test-drm_mm.c:1747:11: error: implicit 
>> declaration of function 'bitmap_zcalloc'; did you mean 'bitmap_zalloc'? 
>> [-Werror=implicit-function-declaration]
     bitmap = bitmap_zcalloc(count, GFP_KERNEL);
              ^~~~~~~~~~~~~~
              bitmap_zalloc
>> drivers/gpu//drm/selftests/test-drm_mm.c:1747:9: warning: assignment to 
>> 'long unsigned int *' from 'int' makes pointer from integer without a cast 
>> [-Wint-conversion]
     bitmap = bitmap_zcalloc(count, GFP_KERNEL);
            ^
   cc1: some warnings being treated as errors

vim +1747 drivers/gpu//drm/selftests/test-drm_mm.c

  1725  
  1726  static int igt_bottomup(void *ignored)
  1727  {
  1728          const struct insert_mode *bottomup = &insert_modes[BOTTOMUP];
  1729          DRM_RND_STATE(prng, random_seed);
  1730          const unsigned int count = 8192;
  1731          unsigned int size;
  1732          unsigned long *bitmap;
  1733          struct drm_mm mm;
  1734          struct drm_mm_node *nodes, *node, *next;
  1735          unsigned int *order, n, m, o = 0;
  1736          int ret;
  1737  
  1738          /* Like igt_topdown, but instead of searching for the last hole,
  1739           * we search for the first.
  1740           */
  1741  
  1742          ret = -ENOMEM;
  1743          nodes = vzalloc(array_size(count, sizeof(*nodes)));
  1744          if (!nodes)
  1745                  goto err;
  1746  
> 1747          bitmap = bitmap_zcalloc(count, GFP_KERNEL);
  1748          if (!bitmap)
  1749                  goto err_nodes;
  1750  
  1751          order = drm_random_order(count, &prng);
  1752          if (!order)
  1753                  goto err_bitmap;
  1754  
  1755          ret = -EINVAL;
  1756          for (size = 1; size <= 64; size <<= 1) {
  1757                  drm_mm_init(&mm, 0, size*count);
  1758                  for (n = 0; n < count; n++) {
  1759                          if (!expect_insert(&mm, &nodes[n],
  1760                                             size, 0, n,
  1761                                             bottomup)) {
  1762                                  pr_err("bottomup insert failed, size %u 
step %d\n", size, n);
  1763                                  goto out;
  1764                          }
  1765  
  1766                          if (!assert_one_hole(&mm, size*(n + 1), 
size*count))
  1767                                  goto out;
  1768                  }
  1769  
  1770                  if (!assert_continuous(&mm, size))
  1771                          goto out;
  1772  
  1773                  drm_random_reorder(order, count, &prng);
  1774                  for_each_prime_number_from(n, 1, min(count, max_prime)) 
{
  1775                          for (m = 0; m < n; m++) {
  1776                                  node = &nodes[order[(o + m) % count]];
  1777                                  drm_mm_remove_node(node);
  1778                                  __set_bit(node_index(node), bitmap);
  1779                          }
  1780  
  1781                          for (m = 0; m < n; m++) {
  1782                                  unsigned int first;
  1783  
  1784                                  node = &nodes[order[(o + m) % count]];
  1785                                  if (!expect_insert(&mm, node,
  1786                                                     size, 0, 0,
  1787                                                     bottomup)) {
  1788                                          pr_err("insert failed, step 
%d/%d\n", m, n);
  1789                                          goto out;
  1790                                  }
  1791  
  1792                                  first = find_first_bit(bitmap, count);
  1793                                  if (node_index(node) != first) {
  1794                                          pr_err("node %d/%d not inserted 
into bottom hole, expected %d, found %d\n",
  1795                                                 m, n, first, 
node_index(node));
  1796                                          goto out;
  1797                                  }
  1798                                  __clear_bit(first, bitmap);
  1799                          }
  1800  
  1801                          DRM_MM_BUG_ON(find_first_bit(bitmap, count) != 
count);
  1802  
  1803                          o += n;
  1804                  }
  1805  
  1806                  drm_mm_for_each_node_safe(node, next, &mm)
  1807                          drm_mm_remove_node(node);
  1808                  DRM_MM_BUG_ON(!drm_mm_clean(&mm));
  1809                  cond_resched();
  1810          }
  1811  
  1812          ret = 0;
  1813  out:
  1814          drm_mm_for_each_node_safe(node, next, &mm)
  1815                  drm_mm_remove_node(node);
  1816          drm_mm_takedown(&mm);
  1817          kfree(order);
  1818  err_bitmap:
  1819          bitmap_free(bitmap);
  1820  err_nodes:
  1821          vfree(nodes);
  1822  err:
  1823          return ret;
  1824  }
  1825  

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

Attachment: .config.gz
Description: application/gzip

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to