Bug 1138759

Summary: bad include in vmwgfx_drm.h
Product: [Fedora] Fedora Reporter: D. Marlin <dmarlin>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: gansalmon, itamar, jbastian, jonathan, kernel-maint, madhu.chinakonda, mchehab
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-17 14:24:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description D. Marlin 2014-09-05 15:03:12 UTC
Description of problem:
The 3.15 kernel has changed the /usr/include/drm/vmwgfx_drm.h file to add a line
  #include <drm.h>

Compilation may fail on this file because the compiler cannot find drm.h since it is in /usr/include/drm, which is not in the default include path for gcc.

Every other kernel header file that reference drm.h includes <drm/drm.h>.  Should vmwgfx_drm.h be updated to include <drm/drm.h> instead of <drm.h>

[root@localhost drm]# grep 'include.*drm.h' /usr/include/drm/*
/usr/include/drm/drm_sarea.h:#include <drm/drm.h>
/usr/include/drm/exynos_drm.h:#include <drm/drm.h>
/usr/include/drm/i915_drm.h:#include <drm/drm.h>
/usr/include/drm/mga_drm.h:#include <drm/drm.h>
/usr/include/drm/msm_drm.h:#include <drm/drm.h>
/usr/include/drm/qxl_drm.h:#include "drm/drm.h"
/usr/include/drm/radeon_drm.h:#include <drm/drm.h>
/usr/include/drm/tegra_drm.h:#include <drm/drm.h>
/usr/include/drm/via_drm.h:#include <drm/drm.h>
/usr/include/drm/vmwgfx_drm.h:#include <drm.h>       <--- the odd one


Version-Release number of selected component (if applicable):
kernel-headers-3.15.10-201.fc20.x86_64 and newer

How reproducible:
consistently

Steps to Reproduce:
1. cat >test-drm_vmwgfx_drm.h.c <<EOF
#include <stddef.h>
#include <stdint.h>
#include <linux/types.h>
#include <drm/vmwgfx_drm.h>
EOF

2. gcc -c -O0 -Wall -I/usr/include/ test-drm_vmwgfx_drm.h.c


Actual results:
In file included from test-drm_vmwgfx_drm.h.c:4:0:
/usr/include/drm/vmwgfx_drm.h:31:17: fatal error: drm.h: No such file or directory

Expected results:
successful compile


Additional info:
This change was introduced by commit 1d7a5cbf8f74e
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=1d7a5cbf8f74e

Originally reported by jbastian.

Comment 1 Josh Boyer 2014-09-05 17:20:15 UTC
Patch sent upstream.

Comment 2 Josh Boyer 2014-09-17 14:24:32 UTC
Fixed in today's rawhide.  Patch is queued for 3.18 upstream.