Messages in this thread | | | Date | Sun, 10 Aug 2003 17:32:15 +0900 (JST) | Subject | virt_to_offset() (Re: [RFC][PATCH] Make cryptoapi non-optional?) | From | YOSHIFUJI Hideaki / 吉藤英明 <> |
| |
In article <20030810081529.GX31810@waste.org> (at Sun, 10 Aug 2003 03:15:29 -0500), Matt Mackall <mpm@selenic.com> says:
: > + sg[0].page = virt_to_page(tmp); > + sg[0].offset = ((long) tmp & ~PAGE_MASK); > + sg[0].length = sizeof(tmp);
BTW, we spread ((long) ptr & ~PAGE_MASK); it seems ugly. Why don't we have vert_to_offset(ptr) or something like this? #define virt_to_offset(ptr) ((unsigned long) (ptr) & ~PAGE_MASK) Is this bad idea?
-- Hideaki YOSHIFUJI @ USAGI Project <yoshfuji@linux-ipv6.org> GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA - 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/
| |