[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200630075026.GN4817@hirez.programming.kicks-ass.net>
Date: Tue, 30 Jun 2020 09:50:26 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Chen Ni <vulab@...as.ac.cn>
Cc: mingo@...hat.com, acme@...nel.org, mark.rutland@....com,
alexander.shishkin@...ux.intel.com, jolsa@...hat.com,
namhyung@...nel.org, linux-kernel@...r.kernel.org
Subject: Re: [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);
Powered by blists - more mailing lists