Subject: linux-next: build failure after merge of the drm tree

From: Stephen Rothwell <[email-masked]>
Date: Thu, 10 Oct 2019 11:22:49 +1100

Hi all,

After merging the drm tree, today's linux-next build (x86_64 allmodconfig)
failed like this:

In file included from drivers/gpu/drm/i915/i915_vma.h:35,
                 from drivers/gpu/drm/i915/gt/uc/intel_guc.h:17,
                 from drivers/gpu/drm/i915/gt/uc/intel_uc.h:9,
                 from drivers/gpu/drm/i915/gt/intel_gt_types.h:16,
                 from drivers/gpu/drm/i915/i915_drv.h:81,
                 from drivers/gpu/drm/i915/i915_getparam.c:7:
drivers/gpu/drm/i915/gem/i915_gem_object.h:174:1: error: redefinition of 'i915_gem_object_never_bind_ggtt'
  174 | i915_gem_object_never_bind_ggtt(const struct drm_i915_gem_object *obj)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/i915/gem/i915_gem_object.h:168:1: note: previous definition of 'i915_gem_object_never_bind_ggtt' was here
  168 | i915_gem_object_never_bind_ggtt(const struct drm_i915_gem_object *obj)
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Caused by the automatic merge of commit

  3a1fea6d2353 ("drm/i915/userptr: Never allow userptr into the mappable GGTT")

from the drm-intel-fixes tree and commits

  a4311745bba9 ("drm/i915/userptr: Never allow userptr into the mappable GGTT")
  3cbad5d77749 ("drm/i915/gem: Refactor tests on obj->ops->flags")

from the drm tree.

I fixed it up by removing the extra definition.  This sort of thing will
keep happening as longs as bugs are fixed in your development trees
and then cherry-picked back into your -fixes trees.  This practise also
causes quite a few unnecessary conflicts that each have to be checked
and merged by hand.

-- 
Cheers,
Stephen Rothwell