* [PATCH] staging: comedi: drivers.c: remove unused inline functions
@ 2012-05-31 20:56 H Hartley Sweeten
0 siblings, 0 replies; only message in thread
From: H Hartley Sweeten @ 2012-05-31 20:56 UTC (permalink / raw)
To: Linux Kernel; +Cc: devel, abbotti, fmhess, gregkh
Remove the inline functions uvirt_to_kva and kvirt_to_kva, they
are not referenced by any of the drivers.c code.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c
index 1c3d638..a0e68f0 100644
--- a/drivers/staging/comedi/drivers.c
+++ b/drivers/staging/comedi/drivers.c
@@ -384,39 +384,6 @@ static int insn_rw_emulate_bits(struct comedi_device *dev,
return 1;
}
-static inline unsigned long uvirt_to_kva(pgd_t *pgd, unsigned long adr)
-{
- unsigned long ret = 0UL;
- pmd_t *pmd;
- pte_t *ptep, pte;
- pud_t *pud;
-
- if (!pgd_none(*pgd)) {
- pud = pud_offset(pgd, adr);
- pmd = pmd_offset(pud, adr);
- if (!pmd_none(*pmd)) {
- ptep = pte_offset_kernel(pmd, adr);
- pte = *ptep;
- if (pte_present(pte)) {
- ret = (unsigned long)
- page_address(pte_page(pte));
- ret |= (adr & (PAGE_SIZE - 1));
- }
- }
- }
- return ret;
-}
-
-static inline unsigned long kvirt_to_kva(unsigned long adr)
-{
- unsigned long va, kva;
-
- va = adr;
- kva = uvirt_to_kva(pgd_offset_k(va), va);
-
- return kva;
-}
-
int comedi_buf_alloc(struct comedi_device *dev, struct comedi_subdevice *s,
unsigned long new_size)
{
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-05-31 20:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-31 20:56 [PATCH] staging: comedi: drivers.c: remove unused inline functions H Hartley Sweeten
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).