Re: [PATCH] Re: 2.3.25-pre1 Compile Fixes

Linus Torvalds (torvalds@transmeta.com)
Fri, 29 Oct 1999 11:40:35 -0700 (PDT)


On Fri, 29 Oct 1999, Ben LaHaise wrote:
>
> Please read the comment in linux/include/linux/mm.h -- the meaning of
> vm_pgoff is different from vm_offset: it's a PAGE_SIZE offset, not a byte
> offset. Several place (esp the framebuffers) were wrong in your patch.
> Here should be the correct fixes (completely untested, but hopefully
> correct).

Nope, this is still broken too in some places..

> diff -ur clean/2.3.25pre1/drivers/sbus/char/vfc_dev.c 2.3.25pre1/drivers/sbus/char/vfc_dev.c
> --- clean/2.3.25pre1/drivers/sbus/char/vfc_dev.c Wed Jun 9 17:44:25 1999
> +++ 2.3.25pre1/drivers/sbus/char/vfc_dev.c Fri Oct 29 13:46:52 1999
> @@ -573,7 +573,9 @@
> map_size=sizeof(struct vfc_regs);
>
>
> - if(vma->vm_offset & ~PAGE_MASK) return -ENXIO;
> + if (vma->vm_pgoff)
> + return -ENXIO;
> +

The above is not the correct conversion. The correct conversion is to just
drop the conditional altogether - because now the offsets cannot be
partial pages at all any more. You seem to have done that correctly in
most places, but at least two places in your patches do the above wrong
test.

Mind fixing it and re-sending? (I'd prefer to not apply patches that are
slightly broken, even if your patch is obviously 99% correct - right now a
broken thing will cause the compiler to not accept the code, while a
conversion like the above will silently just generate the wrong code).

Linus

-
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/