Messages in this thread | | | Date | Wed, 3 Nov 1999 03:29:58 -0500 (EST) | From | Alexander Viro <> | Subject | Re: PATCH] fbmem.c, kernel 2.3.25 |
| |
On Wed, 3 Nov 1999, Ian Baird wrote:
> I noticed that a few lines that referenced the vm_offset member of the > vm_area_struct structure in fbmem.c were giving me errors when i > attempted to compile kernel 2.3.25. Here is my bugfix patch (which works > on my machine with ver limited testing) that turns all references to the > vm_offset member of the aforementioned structure in the code to the > vm_pgoff member of the structure. > > Ian Baird > <ibaird@umr.edu>
<flame> Gentlemen, could we _stop_ this "I don't understand what I've done, but compiler is happy now" sort of patches? Trivial check would show that vm_pgoff is not in bytes, it's in pages (AFAICS it's a part of LFS patch). Result of this voodoo debugging is the code that passes compiler without warnings but is badly broken. If you don't understand what happens - take time to figure it out. Sheesh... Shutting the compiler up != fixing. It hides the problem and makes it very hard to fix - I've seen similar beasts that stayed around for 3-4 years. </flame>
Sorry for that rant, but... I've seen it one too many times.
> --- linux-2.3.25/drivers/video/fbmem.c Thu Oct 28 16:34:46 1999 > +++ linux/drivers/video/fbmem.c Tue Nov 2 20:16:22 1999 > @@ -505,9 +505,9 @@ > len = (start & ~PAGE_MASK)+fix.smem_len; > start &= PAGE_MASK; > len = (len+~PAGE_MASK) & PAGE_MASK; +PAGE_CACHE_SIZE-1) >> PAGE_CACHE_SHIFT; > - if (vma->vm_offset >= len) { > + if (vma->vm_pgoff >= len) { > /* memory mapped io */ > - vma->vm_offset -= len; > + vma->vm_pgoff -= len; > fb->fb_get_var(&var, PROC_CONSOLE(info), info); > if (var.accel_flags) > return -EINVAL;
and so on... Al "/* shut gcc up */ is a shootable offense" Viro -- All that blue light from Orthanc at night? That was Saruman, trying to moderate news.admin.palantir-abuse.sightings. Mike Andrews in the Monastery
- 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/
| |