mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Dan Carpenter" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Dan Carpenter <dan.carpenter@linaro.org>,
	Ingo Molnar <mingo@kernel.org>, Song Liu <song@kernel.org>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: x86/core] x86/module: Remove unnecessary check in module_finalize()
Date: Fri, 21 Feb 2025 13:37:09 -0000	[thread overview]
Message-ID: <174014502999.10177.11219583662056425412.tip-bot2@tip-bot2> (raw)
In-Reply-To: <fcbb2f57-0714-4139-b441-8817365c16a1@stanley.mountain>

The following commit has been merged into the x86/core branch of tip:

Commit-ID:     06dd759b68eea200e488cafbcfd382208a940777
Gitweb:        https://git.kernel.org/tip/06dd759b68eea200e488cafbcfd382208a940777
Author:        Dan Carpenter <dan.carpenter@linaro.org>
AuthorDate:    Wed, 19 Feb 2025 16:48:49 +03:00
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Fri, 21 Feb 2025 14:27:42 +01:00

x86/module: Remove unnecessary check in module_finalize()

The "calls" pointer can no longer be NULL after the following
commit:

   ab9fea59487d ("x86/alternative: Simplify callthunk patching")

Delete this unnecessary check.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/fcbb2f57-0714-4139-b441-8817365c16a1@stanley.mountain
---
 arch/x86/kernel/module.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/x86/kernel/module.c b/arch/x86/kernel/module.c
index cb9d295..615f74c 100644
--- a/arch/x86/kernel/module.c
+++ b/arch/x86/kernel/module.c
@@ -278,10 +278,8 @@ int module_finalize(const Elf_Ehdr *hdr,
 	if (calls) {
 		struct callthunk_sites cs = {};
 
-		if (calls) {
-			cs.call_start = (void *)calls->sh_addr;
-			cs.call_end = (void *)calls->sh_addr + calls->sh_size;
-		}
+		cs.call_start = (void *)calls->sh_addr;
+		cs.call_end = (void *)calls->sh_addr + calls->sh_size;
 
 		callthunks_patch_module_calls(&cs, me);
 	}

      parent reply	other threads:[~2025-02-21 13:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-19 13:48 [PATCH] x86/module: remove " Dan Carpenter
2025-02-19 17:41 ` Song Liu
2025-02-21 13:37 ` tip-bot2 for Dan Carpenter [this message]

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=174014502999.10177.11219583662056425412.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=dan.carpenter@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=song@kernel.org \
    --cc=x86@kernel.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

all inboxes | Powered by JetHome®