From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Nathan Chancellor <nathan@kernel.org>
Cc: kexec@lists.infradead.org, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev, Andrew Morton <akpm@linux-foundation.org>,
Baoquan He <bhe@redhat.com>,
Nick Desaulniers <nick.desaulniers+lkml@gmail.com>,
Bill Wendling <morbo@google.com>,
Justin Stitt <justinstitt@google.com>
Subject: Re: [PATCH v1 1/1] kexec: Remove unused code in kimage_load_cma_segment()
Date: Tue, 16 Sep 2025 15:24:40 +0300 [thread overview]
Message-ID: <aMlXCODJ4SqS_Bci@smile.fi.intel.com> (raw)
In-Reply-To: <20250915221436.GA925462@ax162>
On Mon, Sep 15, 2025 at 03:14:36PM -0700, Nathan Chancellor wrote:
> Hi Andy,
>
> On Mon, Sep 15, 2025 at 05:55:43PM +0200, Andy Shevchenko wrote:
> > 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.
> >
> > Fixes: 07d24902977e ("kexec: enable CMA based contiguous allocation")
>
> I don't think this fixes tag is right. maddr definitely looks used in
> that diff. I think it is a follow up simplification that introduces
> this.
>
> Fixes: f4fecb50d6e1 ("kexec_core: remove superfluous page offset handling in segment loading")
Oh, you are right!
> Otherwise, this patch looks correct to me and GCC 16 will warn on this
> as well.
>
> kernel/kexec_core.c: In function 'kimage_load_cma_segment':
> kernel/kexec_core.c:745:23: error: variable 'maddr' set but not used [-Werror=unused-but-set-variable=]
> 745 | unsigned long maddr;
> | ^~~~~
I'll add this as well to the commit message (in shorter form).
> Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Thank you! I'm going to send a v2 soon.
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2025-09-16 12:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-15 15:55 [PATCH v1 1/1] kexec: Remove unused code in kimage_load_cma_segment() Andy Shevchenko
2025-09-15 22:14 ` Nathan Chancellor
2025-09-16 12:24 ` Andy Shevchenko [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=aMlXCODJ4SqS_Bci@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=bhe@redhat.com \
--cc=justinstitt@google.com \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=nick.desaulniers+lkml@gmail.com \
/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