Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4043078pxf; Tue, 23 Mar 2021 00:40:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzVHj2r5p9aelh1YFbjWt8KHdMnj52W4/hgj+DYApa3iwSntegpZczlmOQ3zSQxPpxRuiDJ X-Received: by 2002:a17:907:778d:: with SMTP id ky13mr3643948ejc.291.1616485254124; Tue, 23 Mar 2021 00:40:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616485254; cv=none; d=google.com; s=arc-20160816; b=k07GtTmQUdBezel3JvHUtioyiYYU5oePg1aQaTBmMPU09tjbBqAsUxt2kjhOalUiNd Hqp2f2KaUGU/m8RGpFsjauoyDCEd4hvV970+9D4x6UqsxIsfmFRJtnlv/g1H/eRHZmjc t1EQrle5EMSUwXoQ3xWDlKD0TEqLJNt988km6Sm+N9n2hoLTEu7HOfJZZBYLdJXzgQE8 Nb/DruuQD3H3VVAouGksfTHj1D5T/U9FbbeEZBkDUdHlkYDIrJgmE8LXQXPDHcQa0H90 r2NmLCLwJzXccOEkZqf6Ju6uhjAguB8gd46afgwOKFBRJ+bNzmtDiZ6Id5VvYV7quYQF gHMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=hNa8GWEFXrTRVC0OdCCWR8WzHJzwy0rEwo3851VyTJ4=; b=quXeE18MeAnV9+xu8KhuLBT7zRGxyFWv1exd1Ai1cesovo3fhoiKt3nS+8YFwS/2Cj 8DsxOa8Rq0kqTdWBNbzwSnMFNVCFAbWoaAIGU1X5OuSlX+fb4CFPfEJOp4j/fVrEwa0S D+aBSS5hQquQfcRq3TkKKRTNPpBfPFW8p/CxBwfg674QjpNxI3WKFw2+npHp9r7R/x+l NgEn5wAXjHZE7SCndwwXE5Nghkjqt/Ojl89cr6+CIDvdjjcgyRqmqzLxj5MNR7k/dRJ+ pglBJhVWs5bHNuOWidjRzOE3MBznpqtzkh7kDWZhz9TIx6QXTummwRzd8LWgAnyjZigx DnfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=qRTsMPhA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h10si1125340ejc.248.2021.03.23.00.40.31; Tue, 23 Mar 2021 00:40:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=qRTsMPhA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229452AbhCWHhj (ORCPT + 99 others); Tue, 23 Mar 2021 03:37:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44414 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229493AbhCWHhT (ORCPT ); Tue, 23 Mar 2021 03:37:19 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F524C061574 for ; Tue, 23 Mar 2021 00:37:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=hNa8GWEFXrTRVC0OdCCWR8WzHJzwy0rEwo3851VyTJ4=; b=qRTsMPhA4kdwJZJ0Xfr0eIoFMr JoDH1zZOh3Crt74HguOFjgttoHgzwTc+f5BrfSQXrGZi8mN9C66dFHH9ObkdfN8kmPXB7CD61UZg5 ZJkPMYnIL5iAg3ZSH0xuyGBGe3g0Hb14Jdn4aPXQC0Y0sSobEZNSjouYfopFsJ3LEzBQiVqf6IShp yEism55VznO61u92T4VpjkpAfbnePlhukLrDoVP5FtjT+43OuGBkrqoBvopD/fnrts9pLLAOeg+x6 03EjdWgzzrIgxMO+iCiAFJAw9N6N8Rp5aACkHdBdYEdQk8eBaUXUF9HuSRM0OMgCalRCO5ht/D/PQ iaZGACFg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lOba6-009jAr-QN; Tue, 23 Mar 2021 07:36:11 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id EE8D73010C8; Tue, 23 Mar 2021 08:35:59 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id D348D2BE708BA; Tue, 23 Mar 2021 08:35:59 +0100 (CET) Date: Tue, 23 Mar 2021 08:35:59 +0100 From: Peter Zijlstra To: Arnd Bergmann Cc: Steven Rostedt , Josh Poimboeuf , Jason Baron , Ingo Molnar , Juri Lelli , Vincent Guittot , Ard Biesheuvel , Dietmar Eggemann , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Frederic Weisbecker , Linux Kernel Mailing List Subject: Re: [PATCH] static_call: fix function type mismatch Message-ID: References: <20210322170711.1855115-1-arnd@kernel.org> <20210322153214.25d869b1@gandalf.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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")