2002-02-12 21:37:15

by Vladimir G Ivanovic

[permalink] [raw]
Subject: Unable to compile 2.5.4: "control reaches end of non-void functionm"

System: Red Hat 7.2 (fully updated) running a 2.4.17 kernel.

* Copied 2.4.17/.config to 2.5.4/.config
* Ran `make oldconfig' and `make dep'
* Then:

# make bzImage
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -o scripts/split-include scripts/split-include.c
scripts/split-include include/linux/autoconf.h include/config
gcc -D__KERNEL__ -I/usr/src/linux-2.5.4/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=i686 -DKBUILD_BASENAME=main -c -o init/main.o init/main.c
In file included from /usr/src/linux-2.5.4/include/asm/thread_info.h:13,
from /usr/src/linux-2.5.4/include/linux/thread_info.h:10,
from /usr/src/linux-2.5.4/include/linux/spinlock.h:7,
from /usr/src/linux-2.5.4/include/linux/mmzone.h:8,
from /usr/src/linux-2.5.4/include/linux/gfp.h:4,
from /usr/src/linux-2.5.4/include/linux/slab.h:14,
from /usr/src/linux-2.5.4/include/linux/proc_fs.h:5,
from init/main.c:15:
/usr/src/linux-2.5.4/include/asm/processor.h: In function `thread_saved_pc':
/usr/src/linux-2.5.4/include/asm/processor.h:444: dereferencing pointer to incomplete type
/usr/src/linux-2.5.4/include/asm/processor.h:445: warning: control reaches end of non-void functionmake: *** [init/main.o] Error 1

--- Vladimir

--------
Vladimir G. Ivanovic http://leonora.org/~vladimir
2770 Cowper St. [email protected]
Palo Alto, CA 94306-2447 +1 650 678 8014


2002-02-13 04:49:20

by Steve Kieu

[permalink] [raw]
Subject: Re: Unable to compile 2.5.4: "control reaches end of non-void functionm"


Hi,

It seems nobody having this problem? No one replies at
least why, so I just want to add one more case of
compiling error. Exactly the same message as yours.



=====
S.KIEU

http://greetings.yahoo.com.au - Yahoo! Greetings
- Send your Valentines love online.

2002-02-13 05:09:31

by John Weber

[permalink] [raw]
Subject: Re: Unable to compile 2.5.4: "control reaches end of non-void functionm"

Steve Kieu wrote:
> Hi,
>
> It seems nobody having this problem? No one replies at
> least why, so I just want to add one more case of
> compiling error. Exactly the same message as yours.
>

Folks on LKML are pretty good about replying to people with problems, so
whenever my posts are ignored here I start checking the archives
(figuring that my problem has probably already been reported and dealt
with). :)


diff -Nru linux-2.5.4 25
--- linux-2.5.4/include/asm-i386/processor.h Sun Feb 10 22:00:29 2002
+++ 25/include/asm-i386/processor.h Sun Feb 10 22:21:53 2002
@@ -435,14 +435,7 @@ extern int kernel_thread(int (*fn)(void
/* Copy and release all segment info associated with a VM */
extern void copy_segments(struct task_struct *p, struct mm_struct * mm);
extern void release_segments(struct mm_struct * mm);
-
-/*
- * Return saved PC of a blocked thread.
- */
-static inline unsigned long thread_saved_pc(struct task_struct *tsk)
-{
- return ((unsigned long *)tsk->thread->esp)[3];
-}
+extern unsigned long thread_saved_pc(struct task_struct *tsk);

unsigned long get_wchan(struct task_struct *p);
#define KSTK_EIP(tsk) (((unsigned long *)(4096+(unsigned
long)(tsk)->thread_in
fo))[1019])
--- linux-2.5.4/arch/i386/kernel/process.c Sun Feb 10 22:00:28 2002
+++ 25/arch/i386/kernel/process.c Sun Feb 10 22:26:35 2002
@@ -55,6 +55,14 @@ asmlinkage void ret_from_fork(void) __as
int hlt_counter;

/*
+ * Return saved PC of a blocked thread.
+ */
+unsigned long thread_saved_pc(struct task_struct *tsk)
+{
+ return ((unsigned long *)tsk->thread.esp)[3];
+}
+
+/*
* Powermanagement idle function, if any..
*/
void (*pm_idle)(void);



--
(o- j o h n e w e b e r
//\ http://www.linuxhq.com/people/weber/
v_/_ [email protected]

2002-02-13 13:51:09

by J.S.S.

[permalink] [raw]
Subject: RE: Unable to compile 2.5.4: "control reaches end of non-void functionm"

I have this same problem on both my laptop and my testbox. It happens
everytime and I have yet to compile 2.5.4 successfully. Although, I suspect
it's in my config file - I'm just using an old config file I used for my
2.4.17 kernel which works just fine.

-----Original Message-----
From: [email protected]
[mailto:[email protected]]On Behalf Of Steve Kieu
Sent: Tuesday, February 12, 2002 8:49 PM
To: kernel
Subject: Re: Unable to compile 2.5.4: "control reaches end of non-void
functionm"



Hi,

It seems nobody having this problem? No one replies at
least why, so I just want to add one more case of
compiling error. Exactly the same message as yours.



=====
S.KIEU

http://greetings.yahoo.com.au - Yahoo! Greetings
- Send your Valentines love online.

2002-02-13 16:28:15

by Daniel J Blueman

[permalink] [raw]
Subject: RE: Unable to compile 2.5.4: "control reaches end of non-void functionm"

Steve,

I get the same/similar issue:

[root@athena linux-2.5.4]# make install
scripts/split-include include/linux/autoconf.h include/config
gcc -D__KERNEL__ -I/usr/src/linux-2.5.4/include -Wall
-Wstrict-prototypes -Wno-t
rigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe
-mprefe
rred-stack-boundary=2 -march=i586 -DKBUILD_BASENAME=main -c -o
init/main.o ini
t/main.c
In file included from /usr/src/linux-2.5.4/include/asm/thread_info.h:13,
from
/usr/src/linux-2.5.4/include/linux/thread_info.h:10,
from /usr/src/linux-2.5.4/include/linux/spinlock.h:7,
from /usr/src/linux-2.5.4/include/linux/mmzone.h:8,
from /usr/src/linux-2.5.4/include/linux/gfp.h:4,
from /usr/src/linux-2.5.4/include/linux/slab.h:14,
from /usr/src/linux-2.5.4/include/linux/proc_fs.h:5,
from init/main.c:15:
/usr/src/linux-2.5.4/include/asm/processor.h: In function
`thread_saved_pc':
/usr/src/linux-2.5.4/include/asm/processor.h:444: dereferencing pointer
to incom
plete type
/usr/src/linux-2.5.4/include/asm/processor.h:445: warning: control
reaches end o
f non-void function
make: *** [init/main.o] Error 1
[root@athena linux-2.5.4]#

____________________
Daniel J Blueman

> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of J.S.S.
> Sent: 13 February 2002 13:54
> To: Steve Kieu
> Cc: linux-kernel
> Subject: RE: Unable to compile 2.5.4: "control reaches end of
> non-void functionm"
>
>
> I have this same problem on both my laptop and my testbox.
> It happens everytime and I have yet to compile 2.5.4
> successfully. Although, I suspect it's in my config file -
> I'm just using an old config file I used for my 2.4.17 kernel
> which works just fine.
>
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]On Behalf Of Steve Kieu
> Sent: Tuesday, February 12, 2002 8:49 PM
> To: kernel
> Subject: Re: Unable to compile 2.5.4: "control reaches end of
> non-void functionm"
>
>
>
> Hi,
>
> It seems nobody having this problem? No one replies at
> least why, so I just want to add one more case of
> compiling error. Exactly the same message as yours.
>
>
>
> =====
> S.KIEU
>
http://greetings.yahoo.com.au - Yahoo! Greetings
- Send your Valentines love online.

2002-02-13 17:38:21

by Per Persson

[permalink] [raw]
Subject: Re: Unable to compile 2.5.4: "control reaches end of non-void functionm"

Hi all!

I had the same problem but found the following post from David Howells.

/Per


> Subject: [PATCH] 2.5.4 compile error fix
>
>
> Hi Linus,
>
> This patch fixes <asm-i386/processor.h> trying to access task_struct (which
> can't have been defined at that point).
>
> David
>
> diff -uNr linux-2.5.4/include/asm-i386/processor.h linux-orn-254/include/asm-i386/processor.h
> --- linux-2.5.4/include/asm-i386/processor.h Mon Feb 11 09:41:35 2002
> +++ linux-orn-254/include/asm-i386/processor.h Mon Feb 11 10:29:29 2002
> @@ -439,10 +439,7 @@
> /*
> * Return saved PC of a blocked thread.
> */
> -static inline unsigned long thread_saved_pc(struct task_struct *tsk)
> -{
> - return ((unsigned long *)tsk->thread->esp)[3];
> -}
> +#define thread_saved_pc(TSK) (((unsigned long *)(TSK)->thread.esp)[3])
>
> unsigned long get_wchan(struct task_struct *p);
> #define KSTK_EIP(tsk) (((unsigned long *)(4096+(unsigned long)(tsk)->thread_info))[1019])
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/


2002-02-14 01:00:28

by Drew P. Vogel

[permalink] [raw]
Subject: RE: Unable to compile 2.5.4: "control reaches end of non-void functionm"

If it is in processor.h, search the archives. There was a patch for this
submitted to the list about a week ago.

--Drew Vogel

On Wed, 13 Feb 2002, J.S.S. wrote:

>I have this same problem on both my laptop and my testbox. It happens
>everytime and I have yet to compile 2.5.4 successfully. Although, I suspect
>it's in my config file - I'm just using an old config file I used for my
>2.4.17 kernel which works just fine.
>
>-----Original Message-----
>From: [email protected]
>[mailto:[email protected]]On Behalf Of Steve Kieu
>Sent: Tuesday, February 12, 2002 8:49 PM
>To: kernel
>Subject: Re: Unable to compile 2.5.4: "control reaches end of non-void
>functionm"
>
>
>
>Hi,
>
>It seems nobody having this problem? No one replies at
>least why, so I just want to add one more case of
>compiling error. Exactly the same message as yours.
>
>
>
>=====
>S.KIEU
>
>http://greetings.yahoo.com.au - Yahoo! Greetings
>- Send your Valentines love online.
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to [email protected]
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at http://www.tux.org/lkml/
>
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to [email protected]
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at http://www.tux.org/lkml/
>

--Drew Vogel

2002-02-14 01:16:49

by Sanjeev Lakshmanan

[permalink] [raw]
Subject: USB device driver

Hi all

I need to develop a USB device driver for a custom
made switch. I shall give a brief description.

The switch (which is connected to the USB port of a
Linux box running REdHat 7.1) has four RJ 45
connectors for ethernet cables and it needs to
exchange data packets of size 8 bytes every .5
seconds. The Transmit ethernet port(1,2,3,4) and
Receive ethernet port(1,2,3,4) need to be selected for
each transfer and the data packet which is to be sent
out and received on those ports changes accordingly.

Please let me know how I can start off writing the
code for this driver.

Also please let me know if there are any SIMILAR
device drivers already developed and available.

I am aware of the files
usr/src/linux/drivers/usb/usb.*
but as I have no prior experience with device drivers,
I am unable to start off.

Regards,
Sanjeev.




__________________________________________________
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com

2002-02-14 13:46:41

by J.S.S.

[permalink] [raw]
Subject: RE: Unable to compile 2.5.4: "control reaches end of non-void functionm"

Got it. Fixed it.
Still getting the video.o compile problem, but this hasn't been fixed yet
(although it's been discussed a bit, the outcome wasn't too clear).


-----Original Message-----
From: Drew P. Vogel [mailto:[email protected]]
Sent: Wednesday, February 13, 2002 4:56 PM
To: J.S.S.
Cc: Steve Kieu; linux-kernel
Subject: RE: Unable to compile 2.5.4: "control reaches end of non-void
functionm"


If it is in processor.h, search the archives. There was a patch for this
submitted to the list about a week ago.

--Drew Vogel

On Wed, 13 Feb 2002, J.S.S. wrote:

>I have this same problem on both my laptop and my testbox. It happens
>everytime and I have yet to compile 2.5.4 successfully. Although, I
suspect
>it's in my config file - I'm just using an old config file I used for my
>2.4.17 kernel which works just fine.
>
>-----Original Message-----
>From: [email protected]
>[mailto:[email protected]]On Behalf Of Steve Kieu
>Sent: Tuesday, February 12, 2002 8:49 PM
>To: kernel
>Subject: Re: Unable to compile 2.5.4: "control reaches end of non-void
>functionm"
>
>
>
>Hi,
>
>It seems nobody having this problem? No one replies at
>least why, so I just want to add one more case of
>compiling error. Exactly the same message as yours.
>
>
>
>=====
>S.KIEU
>
>http://greetings.yahoo.com.au - Yahoo! Greetings
>- Send your Valentines love online.
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to [email protected]
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at http://www.tux.org/lkml/
>
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to [email protected]
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at http://www.tux.org/lkml/
>

--Drew Vogel