Re: [PATCH] 2.3.51 Compile warnings on sparc

From: Sean Hunter (sean@uncarved.co.uk)
Date: Wed Mar 15 2000 - 08:30:08 EST


On Tue, Mar 14, 2000 at 05:50:25PM -0400, Horst von Brand wrote:
> "Sean Hunter" <sean@uncarved.co.uk> said:
>
> [...]
>
> > diff -ur linux/drivers/video/fbmem.c linux.patched/drivers/video/fbmem.c
> > --- linux/drivers/video/fbmem.c Wed Mar 8 22:00:08 2000
> > +++ linux.patched/drivers/video/fbmem.c Mon Mar 13 22:26:27 2000
> > @@ -418,10 +418,13 @@
> > int fbidx = GET_FB_IDX(file->f_dentry->d_inode->i_rdev);
> > struct fb_info *info = registered_fb[fbidx];
> > struct fb_ops *fb = info->fbops;
> > + unsigned long off;
> > +#if !defined(__sparc__) || defined(__sparc_v9__)
> > struct fb_fix_screeninfo fix;
> > struct fb_var_screeninfo var;
> > - unsigned long start, off;
> > + unsigned long start;
> > u32 len;
> > +#endif
>
> Isn't there a more sane condition for this #if? Or add an
> __attribute__((unused)) to the offending variable(s) as needed.

I'm sure that would be fine. I just logically reversed the #ifdef a
few lines below.
 
> > diff -ur linux/fs/nfs/read.c linux.patched/fs/nfs/read.c
> > --- linux/fs/nfs/read.c Sat Nov 27 23:51:32 1999
> > +++ linux.patched/fs/nfs/read.c Mon Mar 13 22:12:11 2000
> > @@ -234,7 +234,7 @@
> >
> > lock_kernel();
> > dprintk("NFS: nfs_readpage (%p %ld@%lu)\n",
> > - page, PAGE_SIZE, page->index);
> > + page, (long)PAGE_SIZE, page->index);
>
> Why not fix the format here and in the next ones? Or fix the #definition of
> PAGE_SIZE to a long constant, if done for the other arches?

I think the latter is exactly what davem has decided to do. I
considered this, but was unsure as to the possible ramifications of
this change (I've only had a sparc running linux for two days prior to
this patch, so I'm no sun guru by any means).
 
> (No criticism intended, this kind of work is needed and much
> appreciated. Thanks!)

No criticism taken. I'm always keen to get other people's opinion -
that's the only way to get better IMO.

Sean

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



This archive was generated by hypermail 2b29 : Thu Mar 23 2000 - 21:00:16 EST