The patch titled Subject: mm: fixmap: convert __set_fixmap_offset() to an inline function has been added to the -mm tree. Its filename is mm-fixmap-convert-__set_fixmap_offset-to-an-inline-function.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-fixmap-convert-__set_fixmap_offset-to-an-inline-function.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-fixmap-convert-__set_fixmap_offset-to-an-inline-function.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Masahiro Yamada <yamada.masahiro@xxxxxxxxxxxxx> Subject: mm: fixmap: convert __set_fixmap_offset() to an inline function I just stopped by the ugly variable name, ________addr. (8 underscores!) If this is just a matter of casting to (unsigned long), this variable is unneeded since you can do like this: ({ \ __set_fixmap(idx, phys, flags); \ (unsigned long)(fix_to_virt(idx) + ((phys) & (PAGE_SIZE - 1))); \ }) However, I'd rather like to change it to an inline function since it is more readable, and the parameter types are clearer. Link: http://lkml.kernel.org/r/20191108124133.31751-1-yamada.masahiro@xxxxxxxxxxxxx Signed-off-by: Masahiro Yamada <yamada.masahiro@xxxxxxxxxxxxx> Reviewed-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> Cc: Arnd Bergmann <arnd@xxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- include/asm-generic/fixmap.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) --- a/include/asm-generic/fixmap.h~mm-fixmap-convert-__set_fixmap_offset-to-an-inline-function +++ a/include/asm-generic/fixmap.h @@ -70,14 +70,14 @@ static inline unsigned long virt_to_fix( __set_fixmap(idx, 0, FIXMAP_PAGE_CLEAR) #endif -/* Return a pointer with offset calculated */ -#define __set_fixmap_offset(idx, phys, flags) \ -({ \ - unsigned long ________addr; \ - __set_fixmap(idx, phys, flags); \ - ________addr = fix_to_virt(idx) + ((phys) & (PAGE_SIZE - 1)); \ - ________addr; \ -}) +/* Return a virtual address with offset calculated */ +static inline unsigned long __set_fixmap_offset(enum fixed_addresses idx, + phys_addr_t phys, + pgprot_t flags) +{ + __set_fixmap(idx, phys, flags); + return fix_to_virt(idx) + ((phys) & (PAGE_SIZE - 1)); +} #define set_fixmap_offset(idx, phys) \ __set_fixmap_offset(idx, phys, FIXMAP_PAGE_NORMAL) _ Patches currently in -mm which might be from yamada.masahiro@xxxxxxxxxxxxx are mm-fixmap-convert-__set_fixmap_offset-to-an-inline-function.patch arch-ipcbufh-make-uapi-asm-ipcbufh-self-contained.patch arch-msgbufh-make-uapi-asm-msgbufh-self-contained.patch arch-sembufh-make-uapi-asm-sembufh-self-contained.patch