From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0749FC433E8 for ; Tue, 23 Mar 2021 07:35:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B89BF619B2 for ; Tue, 23 Mar 2021 07:35:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230012AbhCWHeh (ORCPT ); Tue, 23 Mar 2021 03:34:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229451AbhCWHd4 (ORCPT ); Tue, 23 Mar 2021 03:33:56 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6934FC061574 for ; Tue, 23 Mar 2021 00:33:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; 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=RV79MNudtBE8lOMnZ4MTlcx7T/dwd5UQK0UyE/kmjoA=; b=o2R2IGy4YEqLXdupCdiPDA1S2z loRQEyvdqrl6/JHIRzKM0PuYJq2Ae80RZ19nnOPF1ZqH+LIj8oqmbI7szuTy66l2ZZPOxSkTdUCzy 0brnOO9sAVgA+4/bOaJeVkHahUA14l3jdErwm3IZFdMPLu5rrbtTkRu/o+hWrucVVy1vvKM5TV5la ap7fVXNMnoh+JPZR1EH4Seh3fr8x7WFw2HnLYKSJgiLA7A8k+S05BGeV+rjThxG9/B5vEkJnyjDNg ltxtkHXXmXszdi1B+Fk2QuwVq8/6hk9YhVB2E6P1vf1QVMEzg6Xa1Q3NrjCMZ3mnk3bd2XnauWP0C /6jK9+nw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94 #2 (Red Hat Linux)) id 1lObXm-00E9UD-P8; Tue, 23 Mar 2021 07:33:38 +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 7C1ED3010C8; Tue, 23 Mar 2021 08:33:37 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 3F7F32BD11CB8; Tue, 23 Mar 2021 08:33:37 +0100 (CET) Date: Tue, 23 Mar 2021 08:33:37 +0100 From: Peter Zijlstra To: Arnd Bergmann Cc: Ingo Molnar , Juri Lelli , Vincent Guittot , Arnd Bergmann , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Andrew Morton , Valentin Schneider , linux-kernel@vger.kernel.org Subject: Re: [PATCH] [v2] static_call: fix function type mismatch Message-ID: References: <20210322214309.730556-1-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210322214309.730556-1-arnd@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 22, 2021 at 10:42:24PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > The __static_call_return0() function is declared to return a 'long', > while it aliases a couple of functions that all return 'int'. When > building with 'make W=1', gcc warns about this: > > kernel/sched/core.c:5420:37: error: cast between incompatible function types from 'long int (*)(void)' to 'int (*)(void)' [-Werror=cast-function-type] > 5420 | static_call_update(might_resched, (typeof(&__cond_resched)) __static_call_return0); > > Change all these function to return 'long' as well, but remove the cast to > ensure we get a warning if any of the types ever change. I still think it's utter batshit. Please explain which architecture ABI is affected and why the warning is sane.