mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ronald Bultje <rbultje@ronald.bitfreak.net>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] buz.c compilation problem (missing macro) in 2.4.4
Date: Sat, 28 Apr 2001 09:39:43 +0200	[thread overview]
Message-ID: <20010428093943.A17724@tux.bitfreak.net> (raw)

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


                 reply	other threads:[~2001-04-28  7:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010428093943.A17724@tux.bitfreak.net \
    --to=rbultje@ronald.bitfreak.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®