All of lore.kernel.org
 help / color / mirror / Atom feed
* + kexec_core-remove-superfluous-page-offset-handling-in-segment-loading-fix.patch added to mm-nonmm-unstable branch
@ 2025-09-17  1:42 Andrew Morton
  2025-09-17  8:14 ` Andy Shevchenko
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Morton @ 2025-09-17  1:42 UTC (permalink / raw)
  To: mm-commits, yan.y.zhao, pmladek, nathan, mpdesouza, morbo,
	mario.limonciello, justinstitt, jbouron, gunnarku, graf, bhe,
	andriy.shevchenko, akpm


The patch titled
     Subject: kexec: remove unused code in kimage_load_cma_segment()
has been added to the -mm mm-nonmm-unstable branch.  Its filename is
     kexec_core-remove-superfluous-page-offset-handling-in-segment-loading-fix.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/kexec_core-remove-superfluous-page-offset-handling-in-segment-loading-fix.patch

This patch will later appear in the mm-nonmm-unstable branch at
    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days

------------------------------------------------------
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: kexec: remove unused code in kimage_load_cma_segment()
Date: Tue, 16 Sep 2025 14:51:09 +0200

clang is not happy about set but unused variable:

kernel/kexec_core.c:745:16: error: variable 'maddr' set but not used [-Werror,-Wunused-but-set-variable]
  745 |         unsigned long maddr;
      |                       ^
1 error generated.

Fix the compilation breakage (`make W=1` build) by removing unused variable.

As Nathan noted, GCC 16 produces the similar warning;

Link: https://lkml.kernel.org/r/20250916125124.3094021-2-andriy.shevchenko@linux.intel.com
Fixes: f4fecb50d6e1 ("kexec_core: remove superfluous page offset handling in segment loading")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Cc: Andriy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Baoquan He <bhe@redhat.com>
Cc: Bill Wendling <morbo@google.com>
Cc: Justin Stitt <justinstitt@google.com>
Cc: Alexander Graf <graf@amazon.com>
Cc: Gunnar Kudrjavets <gunnarku@amazon.com>
Cc: Justinien Bouron <jbouron@amazon.com>
Cc: Marcos Paulo de Souza <mpdesouza@suse.com>
Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Petr Mladek <pmladek@suse.com>
Cc: Yan Zhao <yan.y.zhao@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 kernel/kexec_core.c |    3 ---
 1 file changed, 3 deletions(-)

--- a/kernel/kexec_core.c~kexec_core-remove-superfluous-page-offset-handling-in-segment-loading-fix
+++ a/kernel/kexec_core.c
@@ -742,7 +742,6 @@ static int kimage_load_cma_segment(struc
 	struct kexec_segment *segment = &image->segment[idx];
 	struct page *cma = image->segment_cma[idx];
 	char *ptr = page_address(cma);
-	unsigned long maddr;
 	size_t ubytes, mbytes;
 	int result = 0;
 	unsigned char __user *buf = NULL;
@@ -754,7 +753,6 @@ static int kimage_load_cma_segment(struc
 		buf = segment->buf;
 	ubytes = segment->bufsz;
 	mbytes = segment->memsz;
-	maddr = segment->mem;
 
 	/* Then copy from source buffer to the CMA one */
 	while (mbytes) {
@@ -782,7 +780,6 @@ static int kimage_load_cma_segment(struc
 		}
 
 		ptr    += mchunk;
-		maddr  += mchunk;
 		mbytes -= mchunk;
 
 		cond_resched();
_

Patches currently in -mm which might be from andriy.shevchenko@linux.intel.com are

kexec_core-remove-superfluous-page-offset-handling-in-segment-loading-fix.patch


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

* Re: + kexec_core-remove-superfluous-page-offset-handling-in-segment-loading-fix.patch added to mm-nonmm-unstable branch
  2025-09-17  1:42 + kexec_core-remove-superfluous-page-offset-handling-in-segment-loading-fix.patch added to mm-nonmm-unstable branch Andrew Morton
@ 2025-09-17  8:14 ` Andy Shevchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Andy Shevchenko @ 2025-09-17  8:14 UTC (permalink / raw)
  To: Andrew Morton
  Cc: mm-commits, yan.y.zhao, pmladek, nathan, mpdesouza, morbo,
	mario.limonciello, justinstitt, jbouron, gunnarku, graf, bhe

On Tue, Sep 16, 2025 at 06:42:36PM -0700, Andrew Morton wrote:
> 
> The patch titled
>      Subject: kexec: remove unused code in kimage_load_cma_segment()
> has been added to the -mm mm-nonmm-unstable branch.  Its filename is
>      kexec_core-remove-superfluous-page-offset-handling-in-segment-loading-fix.patch
> 
> This patch will shortly appear at
>      https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/kexec_core-remove-superfluous-page-offset-handling-in-segment-loading-fix.patch
> 
> This patch will later appear in the mm-nonmm-unstable branch at
>     git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
> 
> Before you just go and hit "reply", please:
>    a) Consider who else should be cc'ed
>    b) Prefer to cc a suitable mailing list as well
>    c) Ideally: find the original patch on the mailing list and do a
>       reply-to-all to that, adding suitable additional cc's

Thanks for taking this!
I;m just wonder if you can also take this one
https://lore.kernel.org/r/20250904225010.1804783-1-dan.j.williams@intel.com
Yeah, it wasn't Cc'ed to you.

-- 
With Best Regards,
Andy Shevchenko



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

end of thread, other threads:[~2025-09-17  8:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-17  1:42 + kexec_core-remove-superfluous-page-offset-handling-in-segment-loading-fix.patch added to mm-nonmm-unstable branch Andrew Morton
2025-09-17  8:14 ` Andy Shevchenko

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.