lkml.org 
[lkml]   [2020]   [Jun]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kernel: events: use offset_in_page macro
On Tue, Jun 30, 2020 at 07:42:58AM +0000, Chen Ni wrote:

> Use offset_in_page macro instead of (addr & ~PAGE_MASK).

Shees, so now we're replacing a trivial expression with something that's
actually longer to type? How does that make sense?

> - memcpy(dst, kaddr + (vaddr & ~PAGE_MASK), len);
> + memcpy(dst, kaddr + offset_in_page(vaddr), len);

\
 
 \ /
  Last update: 2020-06-30 09:51    [W:0.039 / U:1.500 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site