linux-next: build failure after merge of the staging.current tree

Stephen Rothwell posted 1 patch 11 months, 2 weeks ago
drivers/staging/gpib/tnt4882/mite.c | 9 ---------
drivers/staging/gpib/tnt4882/mite.h | 1 -
2 files changed, 10 deletions(-)
linux-next: build failure after merge of the staging.current tree
Posted by Stephen Rothwell 11 months, 2 weeks ago
Hi all,

After merging the staging.current tree, today's linux-next build (powerpc
allyesconfig) failed like this:

ld: drivers/staging/gpib/tnt4882/mite.o: in function `mite_dma_disarm':
mite.c:(.text+0x1240): multiple definition of `mite_dma_disarm'; drivers/comedi/drivers/mite.o:mite.c:(.text+0x1ac0): first defined here

Exposed by commit

  84b172cea4a2 ("staging: gpib: refer to correct config symbol in tnt4882 Makefile")

It is not, of course, the real cause of the build failure.  The duplicate
version of mite_dma_disarm() in drivers/staging/gpib/tnt4882/mite.c is
not actually used anywhere, so I applied the following patch for today.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Wed, 8 Jan 2025 21:07:23 +1100
Subject: [PATCH] fix for "staging: gpib: refer to correct config symbol in
 tnt4882 Makefile"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/staging/gpib/tnt4882/mite.c | 9 ---------
 drivers/staging/gpib/tnt4882/mite.h | 1 -
 2 files changed, 10 deletions(-)

diff --git a/drivers/staging/gpib/tnt4882/mite.c b/drivers/staging/gpib/tnt4882/mite.c
index 90341f8c394e..22035e53ec35 100644
--- a/drivers/staging/gpib/tnt4882/mite.c
+++ b/drivers/staging/gpib/tnt4882/mite.c
@@ -170,15 +170,6 @@ int mite_dma_tcr(struct mite_struct *mite)
 	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;
diff --git a/drivers/staging/gpib/tnt4882/mite.h b/drivers/staging/gpib/tnt4882/mite.h
index 2ecd83379974..dbfc59468228 100644
--- a/drivers/staging/gpib/tnt4882/mite.h
+++ b/drivers/staging/gpib/tnt4882/mite.h
@@ -64,7 +64,6 @@ 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);
-- 
2.45.2

-- 
Cheers,
Stephen Rothwell
Re: linux-next: build failure after merge of the staging.current tree
Posted by Greg KH 11 months, 2 weeks ago
On Wed, Jan 08, 2025 at 09:42:40PM +1100, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the staging.current tree, today's linux-next build (powerpc
> allyesconfig) failed like this:
> 
> ld: drivers/staging/gpib/tnt4882/mite.o: in function `mite_dma_disarm':
> mite.c:(.text+0x1240): multiple definition of `mite_dma_disarm'; drivers/comedi/drivers/mite.o:mite.c:(.text+0x1ac0): first defined here
> 
> Exposed by commit
> 
>   84b172cea4a2 ("staging: gpib: refer to correct config symbol in tnt4882 Makefile")
> 
> It is not, of course, the real cause of the build failure.  The duplicate
> version of mite_dma_disarm() in drivers/staging/gpib/tnt4882/mite.c is
> not actually used anywhere, so I applied the following patch for today.
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Wed, 8 Jan 2025 21:07:23 +1100
> Subject: [PATCH] fix for "staging: gpib: refer to correct config symbol in
>  tnt4882 Makefile"
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  drivers/staging/gpib/tnt4882/mite.c | 9 ---------
>  drivers/staging/gpib/tnt4882/mite.h | 1 -
>  2 files changed, 10 deletions(-)
> 
> diff --git a/drivers/staging/gpib/tnt4882/mite.c b/drivers/staging/gpib/tnt4882/mite.c
> index 90341f8c394e..22035e53ec35 100644
> --- a/drivers/staging/gpib/tnt4882/mite.c
> +++ b/drivers/staging/gpib/tnt4882/mite.c
> @@ -170,15 +170,6 @@ int mite_dma_tcr(struct mite_struct *mite)
>  	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;
> diff --git a/drivers/staging/gpib/tnt4882/mite.h b/drivers/staging/gpib/tnt4882/mite.h
> index 2ecd83379974..dbfc59468228 100644
> --- a/drivers/staging/gpib/tnt4882/mite.h
> +++ b/drivers/staging/gpib/tnt4882/mite.h
> @@ -64,7 +64,6 @@ 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);
> -- 
> 2.45.2
> 
> -- 
> Cheers,
> Stephen Rothwell


Ah, I just beat you to it:
	https://lore.kernel.org/r/2025010809-padding-survive-91b3@gregkh

I'll queue this up later today, thanks!

greg k-h