Skip to contentSkip to conversation

compat.3.7, compat.3.8: Adds missing of.h include

PATCH In review Richard Röjfors 2 participants 2 messages Dec 10, 2013 – Jan 17, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 compat.3.7, compat.3.8: Adds missing of.h include

This applies to 3.13-rc2

The compat-3.7.c och compat-3.8.c uses of-functions if supported by the kernel, but there is a missing include for linux/of.h.

This patch fixes the compile error which looks like this:

| NOTE: make -j 8 ARCH=arm KLIB_BUILD=/path/usr/src/kernel KLIB=/path/image
|   CC [M]  /path/backports-3.13-rc2-1/compat/compat-3.7.o
| /path/backports-3.13-rc2-1/compat/compat-3.7.c: In function 'of_get_child_by_name':
| /path/backports-3.13-rc2-1/compat/compat-3.7.c:274:1: error: unknown type name 'z'
| /path/backports-3.13-rc2-1/compat/compat-3.7.c:276:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'if'
| make[6]: *** [/path/backports-3.13-rc2-1/compat/compat-3.7.o] Error 1
| make[5]: *** [/path/backports-3.13-rc2-1/compat] Error 2
| make[4]: *** [_module_/path/backports/3.13-rc2-1-r0/backports-3.13-rc2-1] Error 2
| make[3]: *** [modules] Error 2
| make[2]: *** [modules] Error 2
| make[1]: *** [modules] Error 2
| make: *** [default] Error 2

---

compat/compat-3.7.c +2 -0
@@ -256,6 +256,8 @@
 
 #ifdef CONFIG_OF
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0))
+#include <linux/of.h>
+
 /**
  *	of_get_child_by_name - Find the child node by name for a given parent
  *	@node:	parent node
compat/compat-3.8.c +2 -0
@@ -420,6 +420,8 @@
 EXPORT_SYMBOL_GPL(vm_iomap_memory);
 
 #ifdef CONFIG_OF
+#include <linux/of.h>
+
 /**
  * of_find_property_value_of_size
  *
#1 lore raw
Quoted 37 lines · Richard Röjfors

This applies to 3.13-rc2

The compat-3.7.c och compat-3.8.c uses of-functions if supported by the kernel, but there is a missing include for linux/of.h.

This patch fixes the compile error which looks like this:

| NOTE: make -j 8 ARCH=arm KLIB_BUILD=/path/usr/src/kernel KLIB=/path/image
|   CC [M]  /path/backports-3.13-rc2-1/compat/compat-3.7.o
| /path/backports-3.13-rc2-1/compat/compat-3.7.c: In function 'of_get_child_by_name':
| /path/backports-3.13-rc2-1/compat/compat-3.7.c:274:1: error: unknown type name 'z'
| /path/backports-3.13-rc2-1/compat/compat-3.7.c:276:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'if'
| make[6]: *** [/path/backports-3.13-rc2-1/compat/compat-3.7.o] Error 1
| make[5]: *** [/path/backports-3.13-rc2-1/compat] Error 2
| make[4]: *** [_module_/path/backports/3.13-rc2-1-r0/backports-3.13-rc2-1] Error 2
| make[3]: *** [modules] Error 2
| make[2]: *** [modules] Error 2
| make[1]: *** [modules] Error 2
| make: *** [default] Error 2

---

compat/compat-3.7.c +2 -0
@@ -256,6 +256,8 @@
 
 #ifdef CONFIG_OF
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,7,0))
+#include <linux/of.h>
+
 /**
  *	of_get_child_by_name - Find the child node by name for a given parent
  *	@node:	parent node

compat/compat-3.8.c line 427

Quoted 8 lines
compat/compat-3.8.c +2 -0
@@ -420,6 +420,8 @@
 EXPORT_SYMBOL_GPL(vm_iomap_memory);
 
 #ifdef CONFIG_OF
+#include <linux/of.h>
+
 /**
  * of_find_property_value_of_size
  *

In backports-20131206 linux/of.h already gets included in compat/compat-3.7.c and compat/compat-3.8.c.

Could you check if this work for you.

Hauke