Messages in this thread |  | | Date | Wed, 21 May 2025 15:05:53 -0700 | | From | Dan Williams <> | | Subject | Re: [PATCH 1/3] x86/devmem: move range_is_allowed() to drivers/char/mem.c |
| |
Arnd Bergmann wrote: > From: Arnd Bergmann <arnd@arndb.de> > > The global inline function in include/linux/io.h causes problems > because of the unfortunate naming that is too generic, and because > it reintroduces a dependency on the PAGE_SIZE definition that should > not exist in this header file.
Ah, good point.
> Something I had not seen during the earlier review is how the > x86 phys_mem_access_prot_allowed() is called directly after the > generic check for range_is_allowed(), so checking it again actually > has no effect at all, and the definition can be made local to > drivers/char/mem.c with no other caller.
Oh, true.
> > Fixes: 1b3f2bd04d90 ("x86/devmem: Remove duplicate range_is_allowed() definition") > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > --- > arch/x86/mm/pat/memtype.c | 3 --- > drivers/char/mem.c | 18 ++++++++++++++++++ > include/linux/io.h | 21 --------------------- > 3 files changed, 18 insertions(+), 24 deletions(-)
Looks good to me.
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
|  |