lkml.org 
[lkml]   [2001]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subject[PATCH] buz.c compilation problem (missing macro) in 2.4.4
Hi,

2.4.4 returns this error when compiling the buz module, the macro
MALLOC_MAXSIZE is missing:

[...]
gcc -D__KERNEL__ -I/usr/src/linux-2.4.4/include -Wall -Wstrict-prototypes
-O2
-fomit-frame-pointer -fno-strict-aliasing -pipe
-mpreferred-stack-boundary=2 -march=i686
-DMODULE -c -o buz.o buz.c
buz.c: In function `v4l_fbuffer_alloc':
buz.c:188: `KMALLOC_MAXSIZE' undeclared (first use in this function)
buz.c:188: (Each undeclared identifier is reported only once
buz.c:188: for each function it appears in.)
buz.c: In function `jpg_fbuffer_alloc':
buz.c:262: `KMALLOC_MAXSIZE' undeclared (first use in this function)
buz.c:256: warning: `alloc_contig' might be used uninitialized in this
function
buz.c: In function `jpg_fbuffer_free':
buz.c:322: `KMALLOC_MAXSIZE' undeclared (first use in this function)
buz.c:316: warning: `alloc_contig' might be used uninitialized in this
function
buz.c: In function `zoran_ioctl':
buz.c:2837: `KMALLOC_MAXSIZE' undeclared (first use in this function)
make[3]: *** [buz.o] Error 1
[...]

This error was also present in 2.4.3 (forgot to report it :) ).
Some patch seems to have changed the original name of this macro
(MAX_KMALLOC_MEM) into KMALLOC_MAXSIZE, but the define of this macro
(#define MAX_KMALLOC_MEM (512*1024)) was removed...
This value (512 kb) is wrong anyway, according to Dr. Rainer Johanni (the
original maintainer). He recommends to make it 128 kb, which was originally
the value in his driver.

So the proper patch would be as simple as:

*** buz.c-old Sat Apr 28 09:16:24 2001
--- buz.c Sat Apr 28 09:16:57 2001
***************
*** 97,102 ****
--- 97,103 ----
#define MINOR_VERSION 0 /* driver minor version */

#define BUZ_NAME "Iomega BUZ V-1.0" /* name of the driver */
+ #define KMALLOC_MAXSIZE (128*1024)

#define DEBUG(x) /* Debug driver */
#define IDEBUG(x) /* Debug interrupt handler */

Although this driver will probably be replaced by the new one from Serguei
Miridonov sooner or later, imho it's best to fix this for the time being...

--
Ronald Bultje

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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