3/3 staging: hv: fix oops in vmbus - missing #include
PATCH 1/1 3/3 staging: hv: fix oops in vmbus - missing #include
Add missing #include to make hv module compile successfull.
---
diff -uprN -X /usr/src/linux/Documentation/dontdiff /usr/src/linux-2.6.32-rc5/drivers/staging/hv/ChannelMgmt.h /usr/src/linux/drivers/staging/hv/ChannelMgmt.h
--- /usr/src/linux-2.6.32-rc5/drivers/staging/hv/ChannelMgmt.h 2009-10-28 18:13:04.000000000 +0100
+++ /usr/src/linux/drivers/staging/hv/ChannelMgmt.h 2009-10-28
17:47:28.000000000 +0100
@@ -26,6 +26,7 @@
#define _CHANNEL_MGMT_H_
#include <linux/list.h>
+#include <linux/timer.h>
#include "RingBuffer.h"
#include "VmbusChannelInterface.h"
#include "VmbusPacketFormat.h"
diff -uprN -X /usr/src/linux/Documentation/dontdiff /usr/src/linux-2.6.32-rc5/drivers/staging/hv/osd.h /usr/src/linux/drivers/staging/hv/osd.h
--- /usr/src/linux-2.6.32-rc5/drivers/staging/hv/osd.h 2009-10-28 18:13:04.000000000 +0100
+++ /usr/src/linux/drivers/staging/hv/osd.h 2009-10-28
17:51:08.000000000 +0100
@@ -25,6 +25,7 @@
#ifndef _OSD_H_
#define _OSD_H_
+#include <linux/workqueue.h>
/* Defines */
#define ALIGN_UP(value, align) (((value) & (align-1)) ? \
---
Quoted 1 line · Milan Dadok
Add missing #include to make hv module compile successfull.
What is the platform that causes this patch to be needed? This doesn't seem to be needed in my testing here.
thanks,
greg k-h
It's gentoo
Primary I was working on linux-2.6.31-gentoo
gcc-config -l
[1] i686-pc-linux-gnu-4.3.2 *
10 Sep 2009; Mike Pagano <[email protected]>
+gentoo-sources-2.6.31.ebuild:
Initial 2.6.31 release including the fbcondecor patch,, a paoatch to enable control of the unaligned access control policy from sysctl and a patch for bad block relocation support for LiveCD users.
I already suspected some error on my side, therefor I installed vanilla 2.6.32-r5
Because I cannot made it to compile without #include, I send third patch.
Now I tried it again - and it look like only #include in osd.h is missing. In ChannelMgmt.h is not ...
My error is (#include workqueue.h commented in osd.h)
# make SUBDIR=drivers/staging/hv CONFIG_DEBUG_SECTION_MISMATCH=y modules
CHK include/linux/version.h
CHK include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-x86
CALL scripts/checksyscalls.sh CC [M] drivers/staging/hv/blkvsc_drv.o CC [M] drivers/staging/hv/BlkVsc.o
In file included from drivers/staging/hv/BlkVsc.c:24:drivers/staging/hv/osd.h:68: warning: 'struct workqueue_struct' declared inside parameter listdrivers/staging/hv/osd.h:68: warning: its scope is only this definition or declaration, which is probably not what you want
CC [M] drivers/staging/hv/netvsc_drv.o
CC [M] drivers/staging/hv/NetVsc.o
In file included from drivers/staging/hv/NetVsc.c:24:drivers/staging/hv/osd.h:68: warning: 'struct workqueue_struct' declared inside parameter listdrivers/staging/hv/osd.h:68: warning: its scope is only this definition or declaration, which is probably not what you want
CC [M] drivers/staging/hv/RndisFilter.o
In file included from drivers/staging/hv/RndisFilter.c:24:drivers/staging/hv/osd.h:68: warning: 'struct workqueue_struct' declared inside parameter listdrivers/staging/hv/osd.h:68: warning: its scope is only this definition or declaration, which is probably not what you want
CC [M] drivers/staging/hv/storvsc_drv.o
CC [M] drivers/staging/hv/StorVsc.o
In file included from drivers/staging/hv/StorVsc.c:25:drivers/staging/hv/osd.h:68: warning: 'struct workqueue_struct' declared inside parameter listdrivers/staging/hv/osd.h:68: warning: its scope is only this definition or declaration, which is probably not what you want
CC [M] drivers/staging/hv/vmbus_drv.o CC [M] drivers/staging/hv/osd.o CC [M] drivers/staging/hv/Vmbus.o
In file included from drivers/staging/hv/Vmbus.c:24:drivers/staging/hv/osd.h:68: warning: 'struct workqueue_struct' declared inside parameter listdrivers/staging/hv/osd.h:68: warning: its scope is only this definition or declaration, which is probably not what you want
In file included from drivers/staging/hv/Channel.h:28,
from drivers/staging/hv/VmbusPrivate.h:30, from drivers/staging/hv/Vmbus.c:27:drivers/staging/hv/ChannelMgmt.h:232: error: field 'poll_timer' has incomplete typedrivers/staging/hv/Vmbus.c: In function 'VmbusOnMsgDPC':drivers/staging/hv/Vmbus.c:193: warning: passing argument 1 of 'osd_schedule_callback' from incompatible pointer type make[3]: *** [drivers/staging/hv/Vmbus.o] Error 1
make[2]: *** [drivers/staging/hv] Error 2
make[1]: *** [drivers/staging] Error 2
make: *** [drivers] Error 2
Milan
PS. I have another error with 2.6.32-rc5 - if there is some WARNING mismatch in reference, then *.ko is not copied to /lib/modules/2.6.32-rc5/kernel/drivers/staging/hv/
It is correct behaivour of kernel build system?
2.6.31 without warning always copied .ko files to /lib
At 23:46 run
snow# make SUBDIR=drivers/staging/hv CONFIG_DEBUG_SECTION_MISMATCH=y modules
CHK include/linux/version.h
CHK include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-x86
CALL scripts/checksyscalls.sh CC [M] drivers/staging/hv/blkvsc_drv.o CC [M] drivers/staging/hv/BlkVsc.o CC [M] drivers/staging/hv/netvsc_drv.o CC [M] drivers/staging/hv/NetVsc.o CC [M] drivers/staging/hv/RndisFilter.o CC [M] drivers/staging/hv/storvsc_drv.o CC [M] drivers/staging/hv/StorVsc.o CC [M] drivers/staging/hv/vmbus_drv.o CC [M] drivers/staging/hv/osd.o CC [M] drivers/staging/hv/Vmbus.o CC [M] drivers/staging/hv/Hv.o CC [M] drivers/staging/hv/Connection.o CC [M] drivers/staging/hv/Channel.o CC [M] drivers/staging/hv/ChannelMgmt.o CC [M] drivers/staging/hv/ChannelInterface.o CC [M] drivers/staging/hv/RingBuffer.o LD [M] drivers/staging/hv/hv_vmbus.o LD [M] drivers/staging/hv/hv_storvsc.o LD [M] drivers/staging/hv/hv_blkvsc.o LD [M] drivers/staging/hv/hv_netvsc.o
Building modules, stage 2.
MODPOST 401 modules
WARNING: drivers/net/virtio_net.o(.data+0x4c): Section mismatch in reference from the variable virtio_net to the function .devexit.text:virtnet_remove() The variable virtio_net references
the function __devexit virtnet_remove()
If the reference is valid then annotate the
variable with __exit* (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,
CC drivers/staging/hv/hv_blkvsc.mod.o LD [M] drivers/staging/hv/hv_blkvsc.ko CC drivers/staging/hv/hv_netvsc.mod.o LD [M] drivers/staging/hv/hv_netvsc.ko CC drivers/staging/hv/hv_storvsc.mod.o LD [M] drivers/staging/hv/hv_storvsc.ko LD [M] drivers/staging/hv/hv_vmbus.ko
snow hv # ll /lib/modules/2.6.32-rc5/kernel/drivers/staging/hv/ total 156
-rw-r--r-- 1 root root 31415 Oct 28 23:16 hv_blkvsc.ko -rw-r--r-- 1 root root 34863 Oct 28 23:16 hv_netvsc.ko -rw-r--r-- 1 root root 26949 Oct 28 23:16 hv_storvsc.ko -rw-r--r-- 1 root root 53503 Oct 28 23:16 hv_vmbus.ko
-----Original Message-----
From: Greg KH [mailto:[email protected]]
Sent: Wednesday, October 28, 2009 11:31 PM
To: Milan Dadok
Cc: [email protected]; 'Hank Janssen'; 'Haiyang Zhang'
Subject: Re: [PATCH] 3/3 staging: hv: fix oops in vmbus - missing #include
Quoted 1 line · Milan Dadok
Add missing #include to make hv module compile successfull.
What is the platform that causes this patch to be needed? This doesn't seem to be needed in my testing here.
thanks,
greg k-h
Quoted 24 lines · Milan Dadok
It's gentoo
Primary I was working on linux-2.6.31-gentoo
gcc-config -l
[1] i686-pc-linux-gnu-4.3.2 *10 Sep 2009; Mike Pagano <[email protected]>
+gentoo-sources-2.6.31.ebuild:
Initial 2.6.31 release including the fbcondecor patch,, a paoatch to enable control of the unaligned access control policy from sysctl and a patch for bad block relocation support for LiveCD users.I already suspected some error on my side, therefor I installed vanilla 2.6.32-r5
Because I cannot made it to compile without #include, I send third patch.Now I tried it again - and it look like only #include in
osd.his missing. InChannelMgmt.his not ...My error is (#include
workqueue.hcommented inosd.h)# make SUBDIR=drivers/staging/hv CONFIG_DEBUG_SECTION_MISMATCH=y modulesCHK
include/linux/version.h
CHKinclude/linux/utsrelease.h
SYMLINKinclude/asm->include/asm-x86
Quoted 8 lines
CALL scripts/checksyscalls.sh CC [M] drivers/staging/hv/blkvsc_drv.o CC [M] drivers/staging/hv/BlkVsc.oIn file included from
drivers/staging/hv/BlkVsc.c:24:drivers/staging/hv/osd.h:68: warning: 'structworkqueue_struct' declared inside parameter listdrivers/staging/hv/osd.h:68: warning: its scope is only this definition or declaration, which is probably not what you want
Wierd. Can you send me your .config file? I can't duplicate this on Linus's current git tree at all.
Quoted 5 lines
PS. I have another error with 2.6.32-rc5 - if there is some WARNING mismatch in reference, then *.ko is not copied to
/lib/modules/2.6.32-rc5/kernel/drivers/staging/hv/
It is correct behaivour of kernel build system?
2.6.31 without warning always copied .ko files to /lib
I don't know, I think that means an error is happening somewhere else.
thanks,
greg k-h
Quoted 9 lines
Quoted 4 lines · Greg KH
On Wed, Oct 28, 2009 at 11:54:00PM +0100, Milan Dadok wrote:
drivers/staging/hv/osd.h:68: warning: its scope is only this definition or declaration, which is probably not what you wantWierd. Can you send me your .config file? I can't duplicate this on Linus's current git tree at all.
Can you forward me your config as well Milan? I am running of Linus latest Git tree and it works just fine without the include in osd.h. There should be No reason to have the include in osd.h.
Thanks,
Hank.
Quoted 7 lines · Hank Janssen
Quoted 7 lines
Quoted 4 lines · Greg KH
On Wed, Oct 28, 2009 at 11:54:00PM +0100, Milan Dadok wrote:
drivers/staging/hv/osd.h:68: warning: its scope is only this definition or declaration, which is probably not what you want
Quoted 6 lines
Quoted 2 lines
Wierd. Can you send me your .config file? I can't duplicate this on Linus's current git tree at all.
Can you forward me your config as well Milan? I am running of Linus latest Git tree and it works just fine without the include in
osd.h. There should be No reason to have the include inosd.h.
Milan sent it to me off-list, and with Linus's latest tree, I can duplicate this. I'll queue up his patch.
thanks,
greg k-h