lkml.org 
[lkml]   [2002]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subject[PATCH] umem.c - Re: Linux 2.4.19-pre8: compile failure - umem.c, sdla_fr.c
On Friday May 3, eyal@eyal.emu.id.au wrote:
> Marcelo Tosatti wrote:
> > Here goes the pre8. I plan just one more -pre before starting the -rc
> > stage.
>
> I do not have the time to investigate this, so just the failure reports
> follow.
>

Thanks. The following patch should fix the umem problems, however....
>
> gcc -D__KERNEL__ -I/data2/usr/local/src/linux-2.4-pre/include -Wall
> -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common
> -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686
> -malign-functions=4 -DMODULE -DMODVERSIONS -include
> /data2/usr/local/src/linux-2.4-pre/include/linux/modversions.h
> -nostdinc -I /usr/lib/gcc-lib/i386-linux/2.95.4/include
> -DKBUILD_BASENAME=umem -c -o umem.o umem.c
> umem.c:955: warning: `set_bh_page' redefined
> /data2/usr/local/src/linux-2.4-pre/include/linux/modules/buffer.ver:8:
> warning: this is the location of the previous definition
> umem.c:136: field `tasklet' has incomplete type
> umem.c: In function `mm_start_io':
> umem.c:343: warning: right shift count >= width of type

I don't think that this one is fix-able (good that it is only a
warning).
Depending on CONFIG options, dma_addr_t could be 32 bits (producing a
warning) or could be 64 bits (and so requiring the code).

NeilBrown

### Comments for ChangeSet
Fix some compiling problems with umem.c

1/ set_bh_page is now exported, so we don't need our own copy
2/ linux/interrupt.h needed to be included.



----------- Diffstat output ------------
./drivers/block/umem.c | 21 +--------------------
1 files changed, 1 insertion(+), 20 deletions(-)

--- ./drivers/block/umem.c 2002/05/03 03:05:45 1.1
+++ ./drivers/block/umem.c 2002/05/03 03:27:12 1.2
@@ -39,6 +39,7 @@
#include <linux/ioctl.h>
#include <linux/module.h>
#include <linux/init.h>
+#include <linux/interrupt.h>
#include <linux/smp_lock.h>
#include <linux/timer.h>
#include <linux/pci.h>
@@ -945,26 +946,6 @@
{
mark_buffer_uptodate(bh, uptodate);
unlock_buffer(bh);
-}
-
-/* following copied from buffer.c
- * when it gets exported, as it should be, this
- * can be removed.
- */
-/* #define avoids compiler complaints */
-#define set_bh_page mm_set_bh_page
-static void set_bh_page (struct buffer_head *bh, struct page *page, unsigned long offset)
-{
- bh->b_page = page;
- if (offset >= PAGE_SIZE)
- BUG();
- if (PageHighMem(page))
- /*
- * This catches illegal uses and preserves the offset:
- */
- bh->b_data = (char *)(0 + offset);
- else
- bh->b_data = page_address(page) + offset;
}


-
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 13:25    [W:0.097 / U:1.100 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site