[BUG] implicit declaration of kfree/kzalloc in i2c-i801.c on Alpha

Previous thread: [PATCH 0/1] hidraw: compat_ioctl for hidraw by Alan Ott on Monday, January 3, 2011 - 10:37 pm. (1 message)

Next thread: [PATCH] RapidIO: Fix hang on RapidIO doorbell queue full condition by Thomas Taranowski on Tuesday, January 4, 2011 - 12:29 am. (1 message)
From: Bob Tracy
Date: Monday, January 3, 2011 - 11:18 pm

Another 2.6.37-rc8 build failure on alpha:

(...)
  CC [M]  drivers/i2c/busses/i2c-i801.o
drivers/i2c/busses/i2c-i801.c: In function 'i801_probe':
drivers/i2c/busses/i2c-i801.c:737: error: implicit declaration of function 'kzalloc'
drivers/i2c/busses/i2c-i801.c:737: warning: assignment makes pointer from integer without a cast
drivers/i2c/busses/i2c-i801.c:855: error: implicit declaration of function 'kfree'
make[3]: *** [drivers/i2c/busses/i2c-i801.o] Error 1
make[2]: *** [drivers/i2c/busses] Error 2
make[1]: *** [drivers/i2c] Error 2
make: *** [drivers] Error 2

--Bob
--

From: Pekka Enberg
Date: Tuesday, January 4, 2011 - 12:15 am

Adding a

  #include <linux/slab.h>

in drivers/i2c/busses/i2c-i801.c should help. Care to send a tested
patch to do that?
--

From: Matt Turner
Date: Tuesday, January 4, 2011 - 12:37 pm

Is this specific to alpha? I wonder why we don't see this on other platforms?

Thanks Bob,
Matt
--

From: Pekka Enberg
Date: Tuesday, January 4, 2011 - 1:56 pm

The x86 version of <asm/pci.h> includes <linux/slab.h> which hides the
problem on x86 at least. There was a big cleanup of implicit
<linux/slab.h> inclusions few months ago which has exposed the
problem.

It's a bug in the driver, just add the include there.

                        Pekka
--

From: Randy Dunlap
Date: Tuesday, January 4, 2011 - 3:11 pm

exactly.

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
desserts:  http://www.xenotime.net/linux/recipes/
--

From: Bob Tracy
Date: Tuesday, January 4, 2011 - 3:04 pm

I'll start the Intel build this evening to check, but I'd be willing to
bet it's Alpha-specific (only because no one else has hollered).

--Bob
--

From: Maciej Rutecki
Date: Tuesday, January 4, 2011 - 2:10 pm

I created a Bugzilla entry at 
https://bugzilla.kernel.org/show_bug.cgi?id=26132
for your bug report, please add your address to the CC list in there, thanks!


-- 
Maciej Rutecki
http://www.maciek.unixy.pl
--

Previous thread: [PATCH 0/1] hidraw: compat_ioctl for hidraw by Alan Ott on Monday, January 3, 2011 - 10:37 pm. (1 message)

Next thread: [PATCH] RapidIO: Fix hang on RapidIO doorbell queue full condition by Thomas Taranowski on Tuesday, January 4, 2011 - 12:29 am. (1 message)