summaryrefslogtreecommitdiffstats
path: root/arch/sparc/include/asm/pgalloc_32.h
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2012-07-26 11:02:14 +0000
committerDavid S. Miller <davem@davemloft.net>2012-07-26 16:46:15 -0700
commitf71a2aacc63e3185e27ee45e8ebc2bebad9bec28 (patch)
tree3a76b0a10dc0747c1064e1b4218d08e74f7c20d1 /arch/sparc/include/asm/pgalloc_32.h
parent605ae96240a165baaceeff0eeec35e41d68dc978 (diff)
downloadlinux-f71a2aacc63e3185e27ee45e8ebc2bebad9bec28.tar.gz
linux-f71a2aacc63e3185e27ee45e8ebc2bebad9bec28.tar.bz2
linux-f71a2aacc63e3185e27ee45e8ebc2bebad9bec28.zip
sparc32: use void * in nocache get/free
This allowed to us to kill a lot of casts, with no loss of readability in any places Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/include/asm/pgalloc_32.h')
-rw-r--r--arch/sparc/include/asm/pgalloc_32.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/sparc/include/asm/pgalloc_32.h b/arch/sparc/include/asm/pgalloc_32.h
index e5b169b46d21..bf20809f6665 100644
--- a/arch/sparc/include/asm/pgalloc_32.h
+++ b/arch/sparc/include/asm/pgalloc_32.h
@@ -18,8 +18,8 @@ extern struct pgtable_cache_struct {
unsigned long pgd_cache_sz;
} pgt_quicklists;
-unsigned long srmmu_get_nocache(int size, int align);
-void srmmu_free_nocache(unsigned long vaddr, int size);
+void *srmmu_get_nocache(int size, int align);
+void srmmu_free_nocache(void *addr, int size);
#define pgd_quicklist (pgt_quicklists.pgd_cache)
#define pmd_quicklist ((unsigned long *)0)
@@ -32,7 +32,7 @@ void srmmu_free_nocache(unsigned long vaddr, int size);
pgd_t *get_pgd_fast(void);
static inline void free_pgd_fast(pgd_t *pgd)
{
- srmmu_free_nocache((unsigned long)pgd, SRMMU_PGD_TABLE_SIZE);
+ srmmu_free_nocache(pgd, SRMMU_PGD_TABLE_SIZE);
}
#define pgd_free(mm, pgd) free_pgd_fast(pgd)
@@ -50,13 +50,13 @@ static inline void pgd_set(pgd_t * pgdp, pmd_t * pmdp)
static inline pmd_t *pmd_alloc_one(struct mm_struct *mm,
unsigned long address)
{
- return (pmd_t *)srmmu_get_nocache(SRMMU_PMD_TABLE_SIZE,
- SRMMU_PMD_TABLE_SIZE);
+ return srmmu_get_nocache(SRMMU_PMD_TABLE_SIZE,
+ SRMMU_PMD_TABLE_SIZE);
}
static inline void free_pmd_fast(pmd_t * pmd)
{
- srmmu_free_nocache((unsigned long)pmd, SRMMU_PMD_TABLE_SIZE);
+ srmmu_free_nocache(pmd, SRMMU_PMD_TABLE_SIZE);
}
#define pmd_free(mm, pmd) free_pmd_fast(pmd)
@@ -73,13 +73,13 @@ pgtable_t pte_alloc_one(struct mm_struct *mm, unsigned long address);
static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm,
unsigned long address)
{
- return (pte_t *)srmmu_get_nocache(PTE_SIZE, PTE_SIZE);
+ return srmmu_get_nocache(PTE_SIZE, PTE_SIZE);
}
static inline void free_pte_fast(pte_t *pte)
{
- srmmu_free_nocache((unsigned long)pte, PTE_SIZE);
+ srmmu_free_nocache(pte, PTE_SIZE);
}
#define pte_free_kernel(mm, pte) free_pte_fast(pte)