From: Pavel Roskin <proski@gnu.org>
To: grub-devel@gnu.org
Subject: [PATCH 2/3] Eliminate grub_dl_call_init()
Date: Tue, 21 Jul 2009 20:47:50 -0400 [thread overview]
Message-ID: <20090722004750.22269.52630.stgit@mj.roinet.com> (raw)
In-Reply-To: <20090722004743.22269.56117.stgit@mj.roinet.com>
It's just two lines long and there is only one caller. Besides, there
is no equivalent for mod->fini.
ChangeLog:
* kern/dl.c (grub_dl_call_init): Remove.
(grub_dl_load_core): Call mod->init directly.
---
kern/dl.c | 10 ++--------
1 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/kern/dl.c b/kern/dl.c
index ebde547..e2382d6 100644
--- a/kern/dl.c
+++ b/kern/dl.c
@@ -393,13 +393,6 @@ grub_dl_resolve_symbols (grub_dl_t mod, Elf_Ehdr *e)
return GRUB_ERR_NONE;
}
-static void
-grub_dl_call_init (grub_dl_t mod)
-{
- if (mod->init)
- (mod->init) (mod);
-}
-
static grub_err_t
grub_dl_resolve_name (grub_dl_t mod, Elf_Ehdr *e)
{
@@ -559,7 +552,8 @@ grub_dl_load_core (void *addr, grub_size_t size)
mod->ref_count = 1;
- grub_dl_call_init (mod);
+ if (mod->init)
+ (mod->init) (mod);
return mod;
}
next prev parent reply other threads:[~2009-07-22 0:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-22 0:47 [PATCH 1/3] Don't initialize module before grub_dl_add() succeeds Pavel Roskin
2009-07-22 0:47 ` Pavel Roskin [this message]
2009-07-23 8:30 ` [PATCH 2/3] Eliminate grub_dl_call_init() Vladimir 'phcoder' Serbinenko
2009-07-22 0:47 ` [PATCH 3/3] Merge struct grub_dl_list into struct grub_dl Pavel Roskin
2009-07-23 8:33 ` [PATCH 1/3] Don't initialize module before grub_dl_add() succeeds Vladimir 'phcoder' Serbinenko
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=20090722004750.22269.52630.stgit@mj.roinet.com \
--to=proski@gnu.org \
--cc=grub-devel@gnu.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 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.