summaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-01-08 10:10:10 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-01-08 13:15:52 +0100
commit6f79db028e827b023623a6ff825952e0d5fb619f (patch)
tree5585318d9d69d29808e0b3627328b5db9dd1d3ad /drivers/staging
parentstaging: gpib: refer to correct config symbol in tnt4882 Makefile (diff)
downloadlinux-6f79db028e827b023623a6ff825952e0d5fb619f.tar.xz
linux-6f79db028e827b023623a6ff825952e0d5fb619f.zip
staging: gpib: mite: remove unused global functions
The mite.c file was originally copied from the COMEDI code, and now that it is in the kernel tree, along with the comedi code, on some build configurations there are errors due to duplicate symbols (specifically mite_dma_disarm). Remove all of the unused functions in the gpib mite.c and .h files as they aren't needed and cause the compiler to be confused. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/r/202501081239.BAPhfAHJ-lkp@intel.com/ Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Link: https://lore.kernel.org/r/2025010809-padding-survive-91b3@gregkh Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/gpib/tnt4882/mite.c69
-rw-r--r--drivers/staging/gpib/tnt4882/mite.h9
2 files changed, 0 insertions, 78 deletions
diff --git a/drivers/staging/gpib/tnt4882/mite.c b/drivers/staging/gpib/tnt4882/mite.c
index 0edf34d243e9..4bd352967616 100644
--- a/drivers/staging/gpib/tnt4882/mite.c
+++ b/drivers/staging/gpib/tnt4882/mite.c
@@ -148,72 +148,3 @@ void mite_list_devices(void)
}
pr_info("\n");
}
-
-int mite_bytes_transferred(struct mite_struct *mite, int chan)
-{
- int dar, fcr;
-
- dar = readl(mite->mite_io_addr + MITE_DAR + CHAN_OFFSET(chan));
- fcr = readl(mite->mite_io_addr + MITE_FCR + CHAN_OFFSET(chan)) & 0x000000FF;
- return dar - fcr;
-}
-
-int mite_dma_tcr(struct mite_struct *mite)
-{
- int tcr;
- int lkar;
-
- lkar = readl(mite->mite_io_addr + CHAN_OFFSET(0) + MITE_LKAR);
- tcr = readl(mite->mite_io_addr + CHAN_OFFSET(0) + MITE_TCR);
- MDPRINTK("lkar=0x%08x tcr=%d\n", lkar, tcr);
-
- return tcr;
-}
-
-void mite_dma_disarm(struct mite_struct *mite)
-{
- int chor;
-
- /* disarm */
- chor = CHOR_ABORT;
- writel(chor, mite->mite_io_addr + CHAN_OFFSET(0) + MITE_CHOR);
-}
-
-void mite_dump_regs(struct mite_struct *mite)
-{
- void *addr = 0;
- unsigned long temp = 0;
-
- pr_info("mite address is =0x%p\n", mite->mite_io_addr);
-
- addr = mite->mite_io_addr + MITE_CHOR + CHAN_OFFSET(0);
- pr_info("mite status[CHOR]at 0x%p =0x%08lx\n", addr, temp = readl(addr));
- //mite_decode(mite_CHOR_strings,temp);
- addr = mite->mite_io_addr + MITE_CHCR + CHAN_OFFSET(0);
- pr_info("mite status[CHCR]at 0x%p =0x%08lx\n", addr, temp = readl(addr));
- //mite_decode(mite_CHCR_strings,temp);
- addr = mite->mite_io_addr + MITE_TCR + CHAN_OFFSET(0);
- pr_info("mite status[TCR] at 0x%p =0x%08x\n", addr, readl(addr));
- addr = mite->mite_io_addr + MITE_MCR + CHAN_OFFSET(0);
- pr_info("mite status[MCR] at 0x%p =0x%08lx\n", addr, temp = readl(addr));
- //mite_decode(mite_MCR_strings,temp);
- addr = mite->mite_io_addr + MITE_MAR + CHAN_OFFSET(0);
- pr_info("mite status[MAR] at 0x%p =0x%08x\n", addr, readl(addr));
- addr = mite->mite_io_addr + MITE_DCR + CHAN_OFFSET(0);
- pr_info("mite status[DCR] at 0x%p =0x%08lx\n", addr, temp = readl(addr));
- //mite_decode(mite_CR_strings,temp);
- addr = mite->mite_io_addr + MITE_DAR + CHAN_OFFSET(0);
- pr_info("mite status[DAR] at 0x%p =0x%08x\n", addr, readl(addr));
- addr = mite->mite_io_addr + MITE_LKCR + CHAN_OFFSET(0);
- pr_info("mite status[LKCR]at 0x%p =0x%08lx\n", addr, temp = readl(addr));
- //mite_decode(mite_CR_strings,temp);
- addr = mite->mite_io_addr + MITE_LKAR + CHAN_OFFSET(0);
- pr_info("mite status[LKAR]at 0x%p =0x%08x\n", addr, readl(addr));
-
- addr = mite->mite_io_addr + MITE_CHSR + CHAN_OFFSET(0);
- pr_info("mite status[CHSR]at 0x%p =0x%08lx\n", addr, temp = readl(addr));
- //mite_decode(mite_CHSR_strings,temp);
- addr = mite->mite_io_addr + MITE_FCR + CHAN_OFFSET(0);
- pr_info("mite status[FCR] at 0x%p =0x%08x\n\n", addr, readl(addr));
-}
-
diff --git a/drivers/staging/gpib/tnt4882/mite.h b/drivers/staging/gpib/tnt4882/mite.h
index 7a475279b2fb..edb873435b51 100644
--- a/drivers/staging/gpib/tnt4882/mite.h
+++ b/drivers/staging/gpib/tnt4882/mite.h
@@ -61,15 +61,6 @@ int mite_setup(struct mite_struct *mite);
void mite_unsetup(struct mite_struct *mite);
void mite_list_devices(void);
-int mite_dma_tcr(struct mite_struct *mite);
-
-void mite_dma_arm(struct mite_struct *mite);
-void mite_dma_disarm(struct mite_struct *mite);
-
-void mite_dump_regs(struct mite_struct *mite);
-void mite_setregs(struct mite_struct *mite, unsigned long ll_start, int chan, int dir);
-int mite_bytes_transferred(struct mite_struct *mite, int chan);
-
#define CHAN_OFFSET(x) (0x100 * (x))
/* DMA base for chan 0 is 0x500, chan 1 is 0x600 */