All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] Fix return value of mtest when CFG_ALT_MEMTEST set
@ 2008-02-13 10:19 Guennadi Liakhovetski
  2008-02-14 22:37 ` Wolfgang Denk
  0 siblings, 1 reply; 5+ messages in thread
From: Guennadi Liakhovetski @ 2008-02-13 10:19 UTC (permalink / raw)
  To: u-boot

Fix a missing return statement from a non-void function.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>

---

diff --git a/common/cmd_mem.c b/common/cmd_mem.c
index f6bff54..c905304 100644
--- a/common/cmd_mem.c
+++ b/common/cmd_mem.c
@@ -695,6 +695,7 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 	vu_long	*addr, *start, *end;
 	ulong	val;
 	ulong	readback;
+	int     rcode = 0;
 
 #if defined(CFG_ALT_MEMTEST)
 	vu_long	len;
@@ -725,7 +726,6 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 #else
 	ulong	incr;
 	ulong	pattern;
-	int     rcode = 0;
 #endif
 
 	if (argc > 1) {
@@ -983,8 +983,8 @@ int do_mem_mtest (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 		}
 		incr = -incr;
 	}
-	return rcode;
 #endif
+	return rcode;
 }
 
 

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [U-Boot-Users] [PATCH] Fix return value of mtest when CFG_ALT_MEMTEST set
  2008-02-13 10:19 [U-Boot-Users] [PATCH] Fix return value of mtest when CFG_ALT_MEMTEST set Guennadi Liakhovetski
@ 2008-02-14 22:37 ` Wolfgang Denk
  2008-02-15 20:03   ` Guennadi Liakhovetski
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Denk @ 2008-02-14 22:37 UTC (permalink / raw)
  To: u-boot

In message <Pine.LNX.4.64.0802131116340.5484@axis700.grange> you wrote:
> Fix a missing return statement from a non-void function.
> 
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>

Applied, thanks.

Ummm... I had to apply this manually:

error: patch failed: common/cmd_mem.c:695
error: common/cmd_mem.c: patch does not apply
fatal: sha1 information is lacking or useless (common/cmd_mem.c).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001.

How old is your source tree?


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Life. Don't talk to me about life.      - Marvin the Paranoid Android

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot-Users] [PATCH] Fix return value of mtest when CFG_ALT_MEMTEST set
  2008-02-14 22:37 ` Wolfgang Denk
@ 2008-02-15 20:03   ` Guennadi Liakhovetski
  2008-02-15 20:26     ` Jon Loeliger
  0 siblings, 1 reply; 5+ messages in thread
From: Guennadi Liakhovetski @ 2008-02-15 20:03 UTC (permalink / raw)
  To: u-boot

On Thu, 14 Feb 2008, Wolfgang Denk wrote:

> In message <Pine.LNX.4.64.0802131116340.5484@axis700.grange> you wrote:
> > Fix a missing return statement from a non-void function.
> > 
> > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> 
> Applied, thanks.
> 
> Ummm... I had to apply this manually:
> 
> error: patch failed: common/cmd_mem.c:695
> error: common/cmd_mem.c: patch does not apply
> fatal: sha1 information is lacking or useless (common/cmd_mem.c).
> Repository lacks necessary blobs to fall back on 3-way merge.
> Cannot fall back to three-way merge.
> Patch failed at 0001.
> 
> How old is your source tree?

I produced the patch against 1.2.0, but before that I've verified, that 
the file, or at least the affected function hasn't changed, so, thought it 
would be ok. Sorry. But what does the error message actually mean? Is it 
just because I referenced some "way too old" commit?

Thanks
Guennadi
---
Guennadi Liakhovetski

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot-Users] [PATCH] Fix return value of mtest when CFG_ALT_MEMTEST set
  2008-02-15 20:03   ` Guennadi Liakhovetski
@ 2008-02-15 20:26     ` Jon Loeliger
  2008-02-15 20:45       ` Guennadi Liakhovetski
  0 siblings, 1 reply; 5+ messages in thread
From: Jon Loeliger @ 2008-02-15 20:26 UTC (permalink / raw)
  To: u-boot

Guennadi Liakhovetski wrote:
> On Thu, 14 Feb 2008, Wolfgang Denk wrote:
> 
>> In message <Pine.LNX.4.64.0802131116340.5484@axis700.grange> you wrote:
>>> Fix a missing return statement from a non-void function.
>>>
>>> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
>> Applied, thanks.
>>
>> Ummm... I had to apply this manually:
>>
>> error: patch failed: common/cmd_mem.c:695
>> error: common/cmd_mem.c: patch does not apply
>> fatal: sha1 information is lacking or useless (common/cmd_mem.c).
>> Repository lacks necessary blobs to fall back on 3-way merge.
>> Cannot fall back to three-way merge.
>> Patch failed at 0001.
>>
>> How old is your source tree?
> 
> I produced the patch against 1.2.0, but before that I've verified, that 
> the file, or at least the affected function hasn't changed, so, thought it 
> would be ok. Sorry. But what does the error message actually mean? Is it 
> just because I referenced some "way too old" commit?
> 

No.  "Way too old" is not the issue with the error message.

First off, the patch didn't apply directly to the file.
That's our key that the patch isn't up-to-date with the
current tree, as that file has changed significantly enough
that your changes are no longer applicable.

In that situation, git tries to do a clever trick by backing
off to a common ancestor where the patch was originally created.
That is the first SHA1 in the diff header, assuming the patch
was generated by git.  If it can find this commit, git knows that
the patch will apply at that point as that is what your presumably
started with for your patch creation.  Git will apply the patch
there, and try to follow the changes forward in an attempt to
bring the changes up to date itself.

However, in this case, the SHA1 was only in your repository, and
not a common commit that was also in the public repository.  Thus,
git couldn't fall back on the three-way merge trick, and ultimately
was not able to apply your patch.

The remedy is to rebase your patch to a current repository and
resubmit it! :-)  Chance are it will require some conflict resolution.

jdl

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot-Users] [PATCH] Fix return value of mtest when CFG_ALT_MEMTEST set
  2008-02-15 20:26     ` Jon Loeliger
@ 2008-02-15 20:45       ` Guennadi Liakhovetski
  0 siblings, 0 replies; 5+ messages in thread
From: Guennadi Liakhovetski @ 2008-02-15 20:45 UTC (permalink / raw)
  To: u-boot

On Fri, 15 Feb 2008, Jon Loeliger wrote:

> Guennadi Liakhovetski wrote:
> > On Thu, 14 Feb 2008, Wolfgang Denk wrote:
> > 
> > > In message <Pine.LNX.4.64.0802131116340.5484@axis700.grange> you wrote:
> > > > Fix a missing return statement from a non-void function.
> > > > 
> > > > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
> > > Applied, thanks.
> > > 
> > > Ummm... I had to apply this manually:
> > > 
> > > error: patch failed: common/cmd_mem.c:695
> > > error: common/cmd_mem.c: patch does not apply
> > > fatal: sha1 information is lacking or useless (common/cmd_mem.c).
> > > Repository lacks necessary blobs to fall back on 3-way merge.
> > > Cannot fall back to three-way merge.
> > > Patch failed at 0001.
> > > 
> > > How old is your source tree?
> > 
> > I produced the patch against 1.2.0, but before that I've verified, that the
> > file, or at least the affected function hasn't changed, so, thought it would
> > be ok. Sorry. But what does the error message actually mean? Is it just
> > because I referenced some "way too old" commit?
> > 
> 
> No.  "Way too old" is not the issue with the error message.
> 
> First off, the patch didn't apply directly to the file.
> That's our key that the patch isn't up-to-date with the
> current tree, as that file has changed significantly enough
> that your changes are no longer applicable.

Ok, I think, I know the reason. Wolfgang, can it be, that you first tried 
to apply this patch, and only then my other patch

[PATCH v2] Fix wrong memory limit calculation in memory-test

which I sent 5 days earlier? Then there would be a conflict yes. Otherwise 
this specific function hasn't change since then. Probably, I should have 
specified a dependency on my previous patch, sorry.

Thanks
Guennadi
---
Guennadi Liakhovetski

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-02-15 20:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-13 10:19 [U-Boot-Users] [PATCH] Fix return value of mtest when CFG_ALT_MEMTEST set Guennadi Liakhovetski
2008-02-14 22:37 ` Wolfgang Denk
2008-02-15 20:03   ` Guennadi Liakhovetski
2008-02-15 20:26     ` Jon Loeliger
2008-02-15 20:45       ` Guennadi Liakhovetski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.