From: Roman.Hodek@informatik.uni-erlangen.de (Roman Hodek) Date: Sat, 24 Jan 1998 23:15:10 +0100 (CET) To: linux-m68k@lists.linux-m68k.org Subject: L68K: Misc patches for 2.1.79 Sender: owner-linux-m68k@phil.uni-sb.de Reply-To: Roman.Hodek@informatik.uni-erlangen.de Here are some misc patches that I did while first compiling 2.1.79 now (... :-) (with patches by Geert & Andreas already applied): - m68kserial.c: serial_console_setup() should return int - atafb.c: Insert braces against gcc warnings - swap.h, swapfile.c: Move definition of struct swap_list to swap.h again - stram.c: pg_swap_entry now stored in page->offset field - vfat/namei.c: replace slot_info by vfat_slot_info to make compileable again Roman ------------------------------------------------------------------------------ diff -u --recursive --exclude-from=diff-excludes --new-file linux-2.1.79.orig/arch/m68k/atari/stram.c linux-2.1.79/arch/m68k/atari/stram.c --- linux-2.1.79.orig/arch/m68k/atari/stram.c Sat Jan 24 22:17:49 1998 +++ linux-2.1.79/arch/m68k/atari/stram.c Sat Jan 24 22:58:10 1998 @@ -716,7 +716,7 @@ DPRINTK( "unswap_pte: page %08lx = entry %08lx was in swap cache; " "exchanging to %08lx\n", page_address(pg), entry, page ); - pg->pg_swap_entry = page; + pg->offset = page; swap_free(entry); return 1; } diff -u --recursive --exclude-from=diff-excludes --new-file linux-2.1.79.orig/drivers/char/m68kserial.c linux-2.1.79/drivers/char/m68kserial.c --- linux-2.1.79.orig/drivers/char/m68kserial.c Thu Jan 8 15:02:56 1998 +++ linux-2.1.79/drivers/char/m68kserial.c Sat Jan 24 22:41:21 1998 @@ -1642,7 +1642,7 @@ /* * Setup initial baud/bits/parity. */ -__initfunc(static void serial_console_setup(struct console *co, char *options)) +__initfunc(static int serial_console_setup(struct console *co, char *options)) { char *s; int baud = 0, bits, parity; @@ -1739,6 +1739,7 @@ } else if (MACH_IS_MVME16x && co->index == 0) mvme16x_init_console_port (co, cflag); + return( 0 ); } static void dummy_console_write( struct console *co, const char *str, diff -u --recursive --exclude-from=diff-excludes --new-file linux-2.1.79.orig/drivers/video/atafb.c linux-2.1.79/drivers/video/atafb.c --- linux-2.1.79.orig/drivers/video/atafb.c Sat Jan 24 22:20:10 1998 +++ linux-2.1.79/drivers/video/atafb.c Sat Jan 24 22:42:04 1998 @@ -1383,12 +1383,13 @@ var->transp.msb_right=0; linelen = var->xres_virtual * var->bits_per_pixel / 8; - if (screen_len) + if (screen_len) { if (par->yres_virtual) var->yres_virtual = par->yres_virtual; else /* yres_virtual==0 means use maximum */ var->yres_virtual = screen_len / linelen; + } else { if (hwscroll < 0) var->yres_virtual = 2 * var->yres; @@ -1880,12 +1881,13 @@ if (! use_hwscroll) var->yres_virtual=var->yres; - else if (screen_len) + else if (screen_len) { if (par->yres_virtual) var->yres_virtual = par->yres_virtual; else /* yres_virtual==0 means use maximum */ var->yres_virtual = screen_len / linelen; + } else { if (hwscroll < 0) var->yres_virtual = 2 * var->yres; diff -u --recursive --exclude-from=diff-excludes --new-file linux-2.1.79.orig/fs/vfat/namei.c linux-2.1.79/fs/vfat/namei.c --- linux-2.1.79.orig/fs/vfat/namei.c Wed Jan 7 20:19:36 1998 +++ linux-2.1.79/fs/vfat/namei.c Sat Jan 24 23:07:54 1998 @@ -321,7 +321,7 @@ static int vfat_find(struct inode *dir,struct qstr* name, int find_long,int new_filename,int is_dir, - struct slot_info *sinfo_out); + struct vfat_slot_info *sinfo_out); /* Checks the validity of a long MS-DOS filename */ /* Returns negative number on error, 0 for a normal @@ -519,7 +519,7 @@ int res; int spaces; char buf[8]; - struct slot_info sinfo; + struct vfat_slot_info sinfo; const char *name_start; struct qstr qname; @@ -992,7 +992,7 @@ } static int vfat_find(struct inode *dir,struct qstr* qname, - int find_long, int new_filename,int is_dir,struct slot_info *sinfo_out) + int find_long, int new_filename,int is_dir,struct vfat_slot_info *sinfo_out) { struct super_block *sb = dir->i_sb; struct vfat_find_info vf; @@ -1118,7 +1118,7 @@ int vfat_lookup(struct inode *dir,struct dentry *dentry) { int res; - struct slot_info sinfo; + struct vfat_slot_info sinfo; struct inode *result; PRINTK (("vfat_lookup: name=%s, len=%d\n", @@ -1162,7 +1162,7 @@ loff_t offset; struct buffer_head *bh; struct msdos_dir_entry *de; - struct slot_info sinfo; + struct vfat_slot_info sinfo; *result=0; PRINTK(("vfat_create_entry 1\n")); @@ -1388,7 +1388,7 @@ return 0; } -static int vfat_remove_entry(struct inode *dir,struct slot_info *sinfo, +static int vfat_remove_entry(struct inode *dir,struct vfat_slot_info *sinfo, struct buffer_head **bh,struct dentry* dentry, int is_dir,int nospc) { @@ -1428,7 +1428,7 @@ struct super_block *sb = dir->i_sb; int res; struct buffer_head *bh; - struct slot_info sinfo; + struct vfat_slot_info sinfo; res = vfat_find(dir,&dentry->d_name,1,0,0,&sinfo); @@ -1463,7 +1463,7 @@ struct super_block *sb = dir->i_sb; int res; struct buffer_head *bh; - struct slot_info sinfo; + struct vfat_slot_info sinfo; bh = NULL; res = vfat_find(dir,&dentry->d_name,1,0,0,&sinfo); @@ -1540,7 +1540,7 @@ struct dentry *walk; int res, is_dir, i; int locked = 0; - struct slot_info sinfo; + struct vfat_slot_info sinfo; PRINTK(("vfat_rename 1\n")); if (old_dir == new_dir && diff -u --recursive --exclude-from=diff-excludes --new-file linux-2.1.79.orig/include/linux/swap.h linux-2.1.79/include/linux/swap.h --- linux-2.1.79.orig/include/linux/swap.h Sat Jan 24 22:17:57 1998 +++ linux-2.1.79/include/linux/swap.h Sat Jan 24 22:53:41 1998 @@ -75,6 +75,11 @@ void si_swapinfo(struct sysinfo *); unsigned long get_swap_page(void); extern void FASTCALL(swap_free(unsigned long)); +struct swap_list_t { + int head; /* head of priority-ordered swapfile list */ + int next; /* swapfile to be used next */ +}; +extern struct swap_list_t swap_list; /* * vm_ops not present page codes for shared memory. diff -u --recursive --exclude-from=diff-excludes --new-file linux-2.1.79.orig/mm/swapfile.c linux-2.1.79/mm/swapfile.c --- linux-2.1.79.orig/mm/swapfile.c Sat Jan 24 22:17:58 1998 +++ linux-2.1.79/mm/swapfile.c Sat Jan 24 22:53:53 1998 @@ -27,10 +27,7 @@ unsigned int nr_swapfiles = 0; -static struct { - int head; /* head of priority-ordered swapfile list */ - int next; /* swapfile to be used next */ -} swap_list = {-1, -1}; +struct swap_list_t swap_list = {-1, -1}; struct swap_info_struct swap_info[MAX_SWAPFILES];