Message ID | 20210919131248.489798-2-oleksandr@natalenko.name (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | mm: common PAGE_SIZE shift macros | expand |
On Sun, Sep 19, 2021 at 03:12:46PM +0200, Oleksandr Natalenko wrote:
> Signed-off-by: Oleksandr Natalenko <oleksandr@natalenko.name>
I know I can not take patches without any changelog text. Perhaps other
maintainers are more lax :(
thanks,
greg k-h
On Sun, Sep 19, 2021 at 03:12:46PM +0200, Oleksandr Natalenko wrote: > +#define PG2KB(x) ((x) << (PAGE_SHIFT - 10)) > +#define KB2PG(x) ((x) >> (PAGE_SHIFT - 10)) This is not an improvement.
diff --git a/include/linux/mm.h b/include/linux/mm.h index 00bb2d938df4..0a7e950ac8aa 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -98,6 +98,9 @@ extern int mmap_rnd_compat_bits __read_mostly; #include <asm/page.h> #include <asm/processor.h> +#define PG2KB(x) ((x) << (PAGE_SHIFT - 10)) +#define KB2PG(x) ((x) >> (PAGE_SHIFT - 10)) + /* * Architectures that support memory tagging (assigning tags to memory regions, * embedding these tags into addresses that point to these memory regions, and
Signed-off-by: Oleksandr Natalenko <oleksandr@natalenko.name> --- include/linux/mm.h | 3 +++ 1 file changed, 3 insertions(+)