From: Matthew Wilcox <willy@debian.org>
To: Matthew Wilcox <willy@debian.org>
Cc: Linus Torvalds <torvalds@osdl.org>,
Andrew Morton <akpm@zip.com.au>, Greg KH <greg@kroah.com>,
David Mosberger <davidm@hpl.hp.com>,
linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org
Subject: [1/3] insert_resource can succeed and return an error
Date: Thu, 18 Mar 2004 23:51:37 +0000 [thread overview]
Message-ID: <20040318235137.GI25059@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <20040318235024.GH25059@parcelfarce.linux.theplanet.co.uk>
If we start again, we can return an error even if we were successful.
Reset the result to 0 before beginning again. Why don't we use a
tailcall here?
Index: kernel/resource.c
=================================RCS file: /var/cvs/linux-2.6/kernel/resource.c,v
retrieving revision 1.12
diff -u -p -r1.12 resource.c
--- a/kernel/resource.c 28 Feb 2004 01:51:35 -0000 1.12
+++ b/kernel/resource.c 18 Mar 2004 23:41:01 -0000
@@ -337,6 +337,7 @@ int insert_resource(struct resource *par
/* existing resource overlaps end of new resource */
if (next->end > new->end) {
parent = next;
+ result = 0;
goto begin;
}
--
"Next the statesmen will invent cheap lies, putting the blame upon
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince
himself that the war is just, and will thank God for the better sleep
he enjoys after this process of grotesque self-deception." -- Mark Twain
next prev parent reply other threads:[~2004-03-18 23:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-18 23:50 [0/3] Make pci resources show up in iomem/ioport on ia64 Matthew Wilcox
2004-03-18 23:51 ` Matthew Wilcox [this message]
2004-03-18 23:52 ` [2/3] Use insert_resource in pci_claim_resource Matthew Wilcox
2004-03-19 9:56 ` Russell King
2004-03-19 14:52 ` Matthew Wilcox
2004-03-19 15:36 ` Russell King
2004-03-19 17:09 ` Matthew Wilcox
2004-03-18 23:52 ` [3/3] claim PCI resources on ia64 Matthew Wilcox
2004-03-19 1:48 ` David Mosberger
2004-03-19 22:13 ` [0/3] Make pci resources show up in iomem/ioport " Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040318235137.GI25059@parcelfarce.linux.theplanet.co.uk \
--to=willy@debian.org \
--cc=akpm@zip.com.au \
--cc=davidm@hpl.hp.com \
--cc=greg@kroah.com \
--cc=linux-ia64@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox