# Re: [FAILED] BLD phyCORE-i.MX35 + linux-next git kernel

2 messages from 2010-07-07 to 2010-07-07. Participants: Uwe Kleine-König, Stephen Rothwell.
Thread: https://gitlist.dev/t/24315

## Uwe Kleine-König, 2010-07-07 06:47

Subject: Re: [FAILED] BLD phyCORE-i.MX35 + linux-next git kernel
Message-ID: <20100707064735.GE2502@pengutronix.de>
URL: https://gitlist.dev/e/20100707064735.GE2502%40pengutronix.de
In-Reply-To: <20100707114858.e52cec1b.sfr@canb.auug.org.au>

```
Hi,

On Wed, Jul 07, 2010 at 11:48:58AM +1000, Stephen Rothwell wrote:
> Hi Uwe,
> 
> On Tue, 6 Jul 2010 17:22:46 +0200 Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
> >
> > our -next autobuilder barfs:
> > 
> > On Mon, Jul 05, 2010 at 11:10:37PM +0200, Pengutronix Sisyphus Druid wrote:
> > > ...
> > >                               Source URL .... git://git.kernel.org/pub/scm/linux/kernel/git/sfr/linux-next.git
> > >                         Current git hash .... 288092896e2097eebee7d4bf1df9a0c7b550e225
> > >                     Kernel configuration .... use config: mx3_defconfig
> > >                             Kernel build .... [FAILED]
> > > ...
> > >   CC      arch/arm/mm/fault-armv.o
> > >   CC      arch/arm/mm/flush.o
> > >   CC      arch/arm/mach-mx3/clock-imx35.o
> > >   CC      arch/arm/mach-mx3/mach-mx31ads.o
> > >   CC      arch/arm/mach-mx3/mach-mx31lilly.o
> > >   CC      arch/arm/kernel/armksyms.o
> > >   CC      arch/arm/mm/ioremap.o
> > > arch/arm/mach-mx3/mach-mx31lilly.c:300: error: redefinition of 'devices'
> > > arch/arm/mach-mx3/mach-mx31lilly.c:295: error: previous definition of 'devices' was here
> > 
> > The problem is a mis-merge of i..MX/for-next as it contains a patch
> > c0d1dac4a91a665fb5b5f1674acf57dc8cdc07ec that is already in Linus' tree
> > as 4d5d85906ad109987504033fa04991f1b0a2e552:
> 
> OK, this is only the third time I have seen git mismerge something
> automaitcally. :-(
I can reproduce that here[1].  Is this a bug in git?  Can somebody explain?
I expected a merge conflict or only a single occurence of devices[]

> > Stephen: The obvious fix is to remove one of the two identical devices[].
> 
> I have fixed this up in today's linux-next (and will continue to do so
> while necessary).
How do you remember this.  By "hand" or do you have some automatism for
such things?

Best regards and thanks
Uwe

[1] 
	git clone -n git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
	cd linux-next
	git checkout 815c4163b6c8ebf8152f42b0a5fd015cfdcedc78
	git merge c8adc84533d7e98487b77154eedf2eaf0ed6037e
	grep devices[[] arch/arm/mach-mx3/mach-mx31lilly.c
	

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

```

## Stephen Rothwell, 2010-07-07 07:15

Subject: Re: [FAILED] BLD phyCORE-i.MX35 + linux-next git kernel
Message-ID: <20100707171547.822511cd.sfr@canb.auug.org.au>
URL: https://gitlist.dev/e/20100707171547.822511cd.sfr%40canb.auug.org.au
In-Reply-To: <20100707064735.GE2502@pengutronix.de>

```
Hi Uwe,

On Wed, 7 Jul 2010 08:47:35 +0200 Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
>
> > OK, this is only the third time I have seen git mismerge something
> > automaitcally. :-(
> I can reproduce that here[1].  Is this a bug in git?  Can somebody explain?
> I expected a merge conflict or only a single occurence of devices[]

I suspect it is a matter of not enough context (or the context looks the
same after applying one of the updates) for git to realise that both
trees are trying to add the same code in the same place.  There is a
conflict, but the recursive merge decides that each tree is adding
something different and so include them both (or some such :-)).  Most of
the time, git gets this right.

> > I have fixed this up in today's linux-next (and will continue to do so
> > while necessary).
> How do you remember this.  By "hand" or do you have some automatism for
> such things?

In this case, my scripts automatically apply a patch to the merge commit.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

```
