public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	Josh Poimboeuf <jpoimboe@redhat.com>,
	Jason Baron <jbaron@akamai.com>, Ingo Molnar <mingo@redhat.com>,
	Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Ard Biesheuvel <ardb@kernel.org>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
	Daniel Bristot de Oliveira <bristot@redhat.com>,
	Frederic Weisbecker <frederic@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] static_call: fix function type mismatch
Date: Tue, 23 Mar 2021 08:35:59 +0100	[thread overview]
Message-ID: <YFmaXxwcAb9bPchv@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <CAK8P3a2sz4emewH_HA+nsf0e5tP6qtAxhBOFucmzW4OPDJASdQ@mail.gmail.com>

On Mon, Mar 22, 2021 at 10:18:17PM +0100, Arnd Bergmann wrote:

> > Steve is correct. Also, why is that warning correct? On x86 we return in
> > RAX, and using int will simply not inspect the upper 32 bits there.
> 
> I think the code works correctly on all architectures we support because
> both 'int' and 'long' are returned in a register with any unused bits cleared.
> It is however undefined behavior in C because 'int' and 'long' are not
> compatible types, and the calling conventions don't have to allow this.

Then please kill the warning, it's bullshit.

> > And I'm fairly sure I had a pointer user somewhere recently.
> 
> I've only tested my series with 5.12-rc so far, but don't get any other
> such warnings. Maybe it's in linux-next?

No, it's in Linus' tree, see commit:

  c8e2fe13d1d1 ("x86/perf: Use RET0 as default for guest_get_msrs to handle "no PMU" case")

      parent reply	other threads:[~2021-03-23  7:38 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-22 17:06 [PATCH] static_call: fix function type mismatch Arnd Bergmann
2021-03-22 19:32 ` Steven Rostedt
2021-03-22 20:47   ` Peter Zijlstra
2021-03-22 21:18     ` Arnd Bergmann
2021-03-22 21:29       ` Steven Rostedt
2021-03-23  7:47         ` Peter Zijlstra
2021-03-24 12:46           ` Rasmus Villemoes
2021-03-24 16:01             ` Sami Tolvanen
2021-03-24 16:45               ` Rasmus Villemoes
2021-03-24 17:33                 ` Peter Zijlstra
2021-03-24 19:16                   ` Peter Zijlstra
2021-03-24 21:51                   ` Rasmus Villemoes
2021-03-24 22:34                     ` Sami Tolvanen
2021-03-24 22:53                       ` Rasmus Villemoes
2021-03-24 23:40                         ` Sami Tolvanen
2021-03-25  0:42                           ` Rasmus Villemoes
2021-03-25  7:42                             ` Peter Zijlstra
2021-03-25  7:45                               ` Ard Biesheuvel
2021-03-25  8:27                               ` Rasmus Villemoes
2021-03-23  7:35       ` Peter Zijlstra [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=YFmaXxwcAb9bPchv@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=ardb@kernel.org \
    --cc=arnd@kernel.org \
    --cc=bristot@redhat.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=frederic@kernel.org \
    --cc=jbaron@akamai.com \
    --cc=jpoimboe@redhat.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=vincent.guittot@linaro.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