linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: "tianjia.zhang" <tianjia.zhang@linux.alibaba.com>
Cc: "Nick Desaulniers" <ndesaulniers@google.com>,
	"Oliver Upton" <oliver.upton@linux.dev>,
	"Joey Gouly" <joey.gouly@arm.com>,
	"Suzuki K Poulose" <suzuki.poulose@arm.com>,
	"Zenghui Yu" <yuzenghui@huawei.com>,
	"Catalin Marinas" <catalin.marinas@arm.com>,
	"Will Deacon" <will@kernel.org>,
	"Nathan Chancellor" <nathan@kernel.org>,
	"Bill Wendling" <morbo@google.com>,
	"Justin Stitt" <justinstitt@google.com>,
	"Pierre-Clément Tosi" <ptosi@google.com>,
	linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
	linux-kernel@vger.kernel.org, llvm@lists.linux.dev
Subject: Re: [PATCH] KVM: arm64: nVHE: gen-hyprel: Silent build warnings
Date: Thu, 10 Oct 2024 14:03:31 +0100	[thread overview]
Message-ID: <86o73s5cv0.wl-maz@kernel.org> (raw)
In-Reply-To: <b3c21234-73a0-43dd-8365-9039c62b7aa7@linux.alibaba.com>

On Thu, 10 Oct 2024 09:12:29 +0100,
"tianjia.zhang" <tianjia.zhang@linux.alibaba.com> wrote:
> 
> 
> 
> On 10/9/24 7:07 PM, Marc Zyngier wrote:
> > On Wed, 09 Oct 2024 09:57:51 +0100,
> > Tianjia Zhang <tianjia.zhang@linux.alibaba.com> wrote:
> >> 
> >> This patch silent the some mismatch format build warnings
> >> with clang, like:
> >> 
> >>    arch/arm64/kvm/hyp/nvhe/gen-hyprel.c:233:2: warning: format specifies
> >>    type 'unsigned long' but the argument has type 'Elf64_Off'
> >>    (aka 'unsigned long long') [-Wformat]
> >>      233 |         assert_ne(off, 0UL, "%lu");
> >>          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
> >>          |                              %llu
> >>    arch/arm64/kvm/hyp/nvhe/gen-hyprel.c:193:34: note: expanded from macro 'assert_ne'
> >>      193 | #define assert_ne(lhs, rhs, fmt)        assert_op(lhs, rhs, fmt, !=)
> >>          |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >>    arch/arm64/kvm/hyp/nvhe/gen-hyprel.c:188:19: note: expanded from macro 'assert_op'
> >>      187 |                                 " failed (lhs=" fmt ", rhs=" fmt        \
> >>          |                                                 ~~~
> >>      188 |                                 ", line=%d)", _lhs, _rhs, __LINE__);    \
> >>          |                                               ^~~~
> >>    arch/arm64/kvm/hyp/nvhe/gen-hyprel.c:167:17: note: expanded from macro 'fatal_error'
> >>      166 |                 fprintf(stderr, "error: %s: " fmt "\n",                 \
> >>          |                                               ~~~
> >>      167 |                         elf.path, ## __VA_ARGS__);                      \
> >>          |                                      ^~~~~~~~~~~
> >> 
> >> Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
> > 
> > I don't see these warnings. What version of LLVM are you using?
> > 
> 
> I compiled the kernel on Apple Silicon M3 Pro in macOS 15.0.1, Maybe this is
> a special scenario that is rarely used.
> 
> Details of clang:
> 
>     # clang --version
>     Homebrew clang version 19.1.1
>     Target: arm64-apple-darwin24.0.0
>     Thread model: posix
>     InstalledDir: /opt/homebrew/Cellar/llvm/19.1.1/bin

What I have is similar enough:

ClangBuiltLinux clang version 19.1.1 (https://github.com/llvm/llvm-project.git d401987fe349a87c53fe25829215b080b70c0c1a)
Target: aarch64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/maz/hot-poop/llvm/llvm-19.1.1-aarch64/bin

and yet this doesn't fire. Can you try with a compiler actually
targeting with Linux instead of MacOS?

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.


  reply	other threads:[~2024-10-10 13:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-09  8:57 [PATCH] KVM: arm64: nVHE: gen-hyprel: Silent build warnings Tianjia Zhang
2024-10-09 11:07 ` Marc Zyngier
2024-10-10  8:12   ` tianjia.zhang
2024-10-10 13:03     ` Marc Zyngier [this message]
2024-10-14  6:31       ` tianjia.zhang
2024-10-10 15:23     ` Nick Desaulniers
2024-10-14  6:50       ` tianjia.zhang
2024-10-16  6:19 ` kernel test robot

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=86o73s5cv0.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=joey.gouly@arm.com \
    --cc=justinstitt@google.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=morbo@google.com \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=oliver.upton@linux.dev \
    --cc=ptosi@google.com \
    --cc=suzuki.poulose@arm.com \
    --cc=tianjia.zhang@linux.alibaba.com \
    --cc=will@kernel.org \
    --cc=yuzenghui@huawei.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;
as well as URLs for NNTP newsgroup(s).