Skip to content

Commit

Permalink
x86: convert permanent_kmaps_init() from macro to inline
Browse files Browse the repository at this point in the history
Impact: cleanup

This compiler warning:

  arch/x86/mm/init_32.c:515: warning: unused variable 'pgd_base'

triggers because permanent_kmaps_init() is a CPP macro in the
!CONFIG_HIGHMEM case, that does not tell the compiler that the
'pgd_base' parameter is used.

Convert permanent_kmaps_init() (and set_highmem_pages_init()) to
C inline functions - which gives the parameter a proper type and
which gets rid of the compiler warning as well.

Signed-off-by: Ingo Brueckl <ib@wupperonline.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Ingo Brueckl authored and Ingo Molnar committed Jan 2, 2009
1 parent c64d899 commit a9067d5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions arch/x86/mm/init_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -434,8 +434,12 @@ static void __init set_highmem_pages_init(void)
#endif /* !CONFIG_NUMA */

#else
# define permanent_kmaps_init(pgd_base) do { } while (0)
# define set_highmem_pages_init() do { } while (0)
static inline void permanent_kmaps_init(pgd_t *pgd_base)
{
}
static inline void set_highmem_pages_init(void)
{
}
#endif /* CONFIG_HIGHMEM */

void __init native_pagetable_setup_start(pgd_t *base)
Expand Down

0 comments on commit a9067d5

Please sign in to comment.