From: Ingo Molnar <mingo@kernel.org>
To: linux-kernel@vger.kernel.org
Cc: Peter Zijlstra <peterz@infradead.org>,
Josh Poimboeuf <jpoimboe@redhat.com>,
Sami Tolvanen <samitolvanen@google.com>,
Borislav Petkov <bp@alien8.de>,
Linus Torvalds <torvalds@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>
Subject: [PATCH 2/3] objtool: Rename elf_read() to elf_open_read()
Date: Wed, 22 Apr 2020 12:32:04 +0200 [thread overview]
Message-ID: <20200422103205.61900-3-mingo@kernel.org> (raw)
In-Reply-To: <20200422103205.61900-1-mingo@kernel.org>
'struct elf *' handling is an open/close paradigm, make sure the naming
matches that:
elf_open_read()
elf_write()
elf_close()
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
tools/objtool/check.c | 2 +-
tools/objtool/elf.c | 2 +-
tools/objtool/elf.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index f2a84271e807..12e2aea42bb2 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -2614,7 +2614,7 @@ int check(const char *_objname, bool orc)
objname = _objname;
- file.elf = elf_read(objname, orc ? O_RDWR : O_RDONLY);
+ file.elf = elf_open_read(objname, orc ? O_RDWR : O_RDONLY);
if (!file.elf)
return 1;
diff --git a/tools/objtool/elf.c b/tools/objtool/elf.c
index fab5534c3365..453b723c89d5 100644
--- a/tools/objtool/elf.c
+++ b/tools/objtool/elf.c
@@ -542,7 +542,7 @@ static int read_relas(struct elf *elf)
return 0;
}
-struct elf *elf_read(const char *name, int flags)
+struct elf *elf_open_read(const char *name, int flags)
{
struct elf *elf;
Elf_Cmd cmd;
diff --git a/tools/objtool/elf.h b/tools/objtool/elf.h
index a55bcde9f1b1..5e76ac38cf99 100644
--- a/tools/objtool/elf.h
+++ b/tools/objtool/elf.h
@@ -113,7 +113,7 @@ static inline u32 rela_hash(struct rela *rela)
return sec_offset_hash(rela->sec, rela->offset);
}
-struct elf *elf_read(const char *name, int flags);
+struct elf *elf_open_read(const char *name, int flags);
struct section *elf_create_section(struct elf *elf, const char *name, size_t entsize, int nr);
struct section *elf_create_rela_section(struct elf *elf, struct section *base);
void elf_add_rela(struct elf *elf, struct rela *rela);
--
2.20.1
next prev parent reply other threads:[~2020-04-22 10:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-22 10:32 [PATCH 0/3] objtool: Constify most of the instruction decoding loop Ingo Molnar
2020-04-22 10:32 ` [PATCH 1/3] objtool: Constify 'struct elf *' parameters Ingo Molnar
2020-04-23 7:49 ` [tip: objtool/core] " tip-bot2 for Ingo Molnar
2020-04-22 10:32 ` Ingo Molnar [this message]
2020-04-22 11:43 ` [PATCH 2/3] objtool: Rename elf_read() to elf_open_read() Peter Zijlstra
2020-04-22 14:22 ` Ingo Molnar
2020-04-22 17:00 ` Matt Helsley
2020-04-22 19:22 ` Ingo Molnar
2020-04-23 7:49 ` [tip: objtool/core] " tip-bot2 for Ingo Molnar
2020-04-22 10:32 ` [PATCH 3/3] objtool: Constify arch_decode_instruction() Ingo Molnar
2020-04-23 7:49 ` [tip: objtool/core] " tip-bot2 for Ingo Molnar
2020-04-22 20:49 ` [PATCH 0/3] objtool: Constify most of the instruction decoding loop Josh Poimboeuf
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=20200422103205.61900-3-mingo@kernel.org \
--to=mingo@kernel.org \
--cc=bp@alien8.de \
--cc=jpoimboe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=samitolvanen@google.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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
Powered by JetHome