[lkml]   [2003]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[patch] 2.4.22-pre10-ac1: fix tp600.c compile warning
I got the following compile warning in 2.4.22-pre10-ac1:

<-- snip -->

gcc -D__KERNEL__
de -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing
-fno-common -pipe -mpreferred-stack-boundary=2 -march=k6 -nostdinc -iwithprefix
include -DKBUILD_BASENAME=tp600 -c -o tp600.o tp600.c
tp600.c: In function `h2999_cleanup':
tp600.c:417: warning: control reaches end of non-void function

<-- snip -->

Since the only caller of this function doesn't check the return value, I
assume the following patch might be correct?

--- linux-2.4.22-pre10-ac1-full/drivers/hotplug/tp600.c~ 2003-08-02 01:44:02.000000000 +0200
+++ linux-2.4.22-pre10-ac1-full/drivers/hotplug/tp600.c 2003-08-02 23:13:34.000000000 +0200
@@ -402,7 +402,7 @@
* Unregister and free up all of our slots

-static int __devinit h2999_cleanup(struct h2999_dev *dev)
+static void __devinit h2999_cleanup(struct h2999_dev *dev)
struct h2999_slot *s;
int slot;

I've tested the compilation with 2.4.22-pre10-ac1.



"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:47    [W:0.073 / U:1.748 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site