Skip to contentSkip to conversation

Add missing #include for include/scsi/osd_protocol.h

PATCH In review Martin Michlmayr 3 participants 6 messages Oct 31, 2009 – Nov 1, 2009 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add missing #include for include/scsi/osd_protocol.h

include/scsi/osd_protocol.h is missing an #include, leading to:
| include/scsi/osd_protocol.h:277: error: implicit declaration of function '__constant_cpu_to_be16' | include/scsi/osd_protocol.h:362: error: implicit declaration of function 'ALIGN'

include/scsi/osd_protocol.h +1 -0
@@ -17,6 +17,7 @@
 #define __OSD_PROTOCOL_H__
 
 #include <linux/types.h>
+#include <linux/kernel.h>
 #include <asm/unaligned.h>
 #include <scsi/scsi.h>
 
Signature · 2 lines
Martin Michlmayr
http://www.cyrius.com/
#1 lore raw
Quoted 4 lines · Martin Michlmayr

include/scsi/osd_protocol.h is missing an #include, leading to:
| include/scsi/osd_protocol.h:277: error: implicit declaration of function '__constant_cpu_to_be16' | include/scsi/osd_protocol.h:362: error: implicit declaration of function 'ALIGN'

I cannot reproduce this problem. What platform (ARCH/config) are you compiling this?

Because you see I have a source file in the tree that has this #include as very first include. And it has been compiling in Kernel and in -next for a long time. (drivers/scsi/osd/osd_initiator.c has osd_initiator.h as first header which has
osd_protocol.h as first header.)

Quoted 11 lines
include/scsi/osd_protocol.h +1 -0
@@ -17,6 +17,7 @@
 #define __OSD_PROTOCOL_H__
 
 #include <linux/types.h>
+#include <linux/kernel.h>
 #include <asm/unaligned.h>
 
Quoted 1 line

From what I can see, asm/unaligned.h eventually pulls kernel.h through

one of it's possible implementations. Do you have a special asm/unaligned.h?

Quoted 3 lines

#include <scsi/scsi.h>

Please help me reproduce this problem.

Boaz

#2 lore raw
Quoted 6 lines · Boaz Harrosh
Quoted 3 lines

include/scsi/osd_protocol.h is missing an #include, leading to:
| include/scsi/osd_protocol.h:277: error: implicit declaration of function '__constant_cpu_to_be16' | include/scsi/osd_protocol.h:362: error: implicit declaration of function 'ALIGN'

I cannot reproduce this problem. What platform (ARCH/config) are you compiling this?

Sorry, I forgot to say that this happens on ARM.

Signature · 2 lines
Martin Michlmayr
http://www.cyrius.com/
#3 lore raw
Quoted 9 lines · Martin Michlmayr
Quoted 6 lines · Boaz Harrosh
Quoted 3 lines

include/scsi/osd_protocol.h is missing an #include, leading to:
| include/scsi/osd_protocol.h:277: error: implicit declaration of function '__constant_cpu_to_be16' | include/scsi/osd_protocol.h:362: error: implicit declaration of function 'ALIGN'

I cannot reproduce this problem. What platform (ARCH/config) are you compiling this?

Sorry, I forgot to say that this happens on ARM.

Yes I can see now linux/unaligned/le_byteshift.h and linux/unaligned/be_byteshift.h look broken, they do not include headers who's definitions are used. All the other alternatives in linux/unaligned/ ,example access_ok.h, do. Sigh

But one thing I do not understand, in linux-next is there not a single ARM platform that does a "make allmodconfig". (Or they do but the compilation error was never reported?)

#4 lore raw

Hi Boaz,

Quoted 7 lines · On Sun, 01 Nov 2009 13:25:43 +0200 Boaz Harrosh <[email protected]> wrote:

Yes I can see now linux/unaligned/le_byteshift.h and linux/unaligned/be_byteshift.h look broken, they do not include headers who's definitions are used. All the other alternatives in linux/unaligned/ ,example access_ok.h, do. Sigh

But one thing I do not understand, in linux-next is there not a single ARM platform that does a "make allmodconfig". (Or they do but the compilation error was never reported?)

The arm allmodconfig is really a non starter I am told (allmodconfig is really per arch, not per platform). However you can see all the linux-next build results for arm (and lots of others) at
http://kisskb.ellerman.id.au/kisskb/branch/9/ . I often don't have time to review the build results - I assume that other people with an interest will do so.

Signature · 3 lines
Cheers,
Stephen Rothwell                    [email protected]
http://www.canb.auug.org.au/~sfr/
#5 lore raw
Quoted 19 lines · Stephen Rothwell

Hi Boaz,

Quoted 7 lines · On Sun, 01 Nov 2009 13:25:43 +0200 Boaz Harrosh <[email protected]> wrote:

Yes I can see now linux/unaligned/le_byteshift.h and linux/unaligned/be_byteshift.h look broken, they do not include headers who's definitions are used. All the other alternatives in linux/unaligned/ ,example access_ok.h, do. Sigh

But one thing I do not understand, in linux-next is there not a single ARM platform that does a "make allmodconfig". (Or they do but the compilation error was never reported?)

The arm allmodconfig is really a non starter I am told (allmodconfig is really per arch, not per platform). However you can see all the linux-next build results for arm (and lots of others) at
http://kisskb.ellerman.id.au/kisskb/branch/9/ . I often don't have time to review the build results - I assume that other people with an interest will do so.

Quoted 1 line

From the list you've sent (above), there is not a single ARM platform

that does an allXXXconfig. They are all a "defconfig". I'll bear that in mind next time.

(Time for that arm cross compiler)

Thanks
Boaz