Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1879729rwr; Fri, 21 Apr 2023 00:31:43 -0700 (PDT) X-Google-Smtp-Source: AKy350ZIaxHDHxtcW5QPYZFawUPtTIw0hDACjTb2FsTALSGODykyYgmJ4tsiCsXswQkBrZBrV2Cu X-Received: by 2002:a17:90a:1306:b0:24b:2fc1:8a9c with SMTP id h6-20020a17090a130600b0024b2fc18a9cmr4459899pja.11.1682062302801; Fri, 21 Apr 2023 00:31:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682062302; cv=none; d=google.com; s=arc-20160816; b=nSzEACJ/Rl1CjFlZJojkNz61870HQP9NwTb1MYSr6AFCWxJFgnEbhzX4UFSlKNit18 ubKopsAWxm96qIkPB4Kw/Iz1EvkaJsiDqH1ljQ/88JXFwizA9ChXy4bvSKCEbCewjVWk RdbZGRfFIIQtfrIpOFr4d/x05toPUBbqlSH2p9T5qbTA9Waph20Uwz9SvXto66hDU+pL tAaDS+uCbTPyx5XycVTP8QSyA8G7NhPf/adEpzPUJJK92ILZ6R0DU6Aql/yBCn+Odp5j Yra/iDPG6J6TXXv9OtMi0dnJ7fx3Wnwip9caWAlyg9yc+PNt8wysSnUD2twHLrMoQ0G3 lykw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=FgDICcQYoEcRJI0Gh8m3unms8k9thaqGprBPSw3uaUw=; b=dVuT963RyOGbbzjwKPeoCqd5A61huwwdIPf6wLeQ9EjL5OlwM1Caa9aE7qgmPRy6sv 785tXe+/IeK50UAbhcpG68ktTGp7ah4mhQTy3dTZVivXAbvvoeojyvYDHroTK/rLaUh2 z+iZQw4s0QtovcLQD2/xf6RUXKSb2/FUC05kRsR7F+ztiID/MzCsVdRIbQYNtsx65QG6 Pybf5BghOEZirS24wzW10Bz+1FyQ+v17wEjgBimGrTFC/2U4prHdewEZ8leuTUJRLROR HgLsZFycR2KhoD2Z+jeWQl0PQA6KzfRcFhKcWsig490VQNE8Uyti0+NTVwvNuoDehD4m Ge8Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l70-20020a638849000000b00517ba74c173si3694747pgd.506.2023.04.21.00.31.28; Fri, 21 Apr 2023 00:31:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230451AbjDUH1r (ORCPT + 99 others); Fri, 21 Apr 2023 03:27:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230124AbjDUH1q (ORCPT ); Fri, 21 Apr 2023 03:27:46 -0400 Received: from elvis.franken.de (elvis.franken.de [193.175.24.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BBBFD132; Fri, 21 Apr 2023 00:27:44 -0700 (PDT) Received: from uucp (helo=alpha) by elvis.franken.de with local-bsmtp (Exim 3.36 #1) id 1pplBD-0004sS-00; Fri, 21 Apr 2023 09:27:39 +0200 Received: by alpha.franken.de (Postfix, from userid 1000) id E0BBCC0121; Fri, 21 Apr 2023 09:27:12 +0200 (CEST) Date: Fri, 21 Apr 2023 09:27:12 +0200 From: Thomas Bogendoerfer To: Nathan Chancellor Cc: Nick Desaulniers , jpoimboe@kernel.org, peterz@infradead.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, patches@lists.linux.dev Subject: Re: [PATCH] MIPS: Mark check_bugs{,_early}() as __init Message-ID: <20230421072712.GA5563@alpha.franken.de> References: <20230419-mips-check_bugs-init-attribute-v1-1-91e6eed55b89@kernel.org> <20230419233710.GA1314058@dev-arch.thelio-3990X> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230419233710.GA1314058@dev-arch.thelio-3990X> User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 19, 2023 at 04:37:10PM -0700, Nathan Chancellor wrote: > > > diff --git a/arch/mips/include/asm/bugs.h b/arch/mips/include/asm/bugs.h > > > index d72dc6e1cf3c..9b9bf9bc7d24 100644 > > > --- a/arch/mips/include/asm/bugs.h > > > +++ b/arch/mips/include/asm/bugs.h > > > @@ -24,13 +24,13 @@ extern void check_bugs64_early(void); > > > extern void check_bugs32(void); > > > extern void check_bugs64(void); > > > > > > -static inline void check_bugs_early(void) > > > +static inline void __init check_bugs_early(void) > > > { > > > if (IS_ENABLED(CONFIG_CPU_R4X00_BUGS64)) > > > check_bugs64_early(); > > > } > > > > If the only call site is in arch/mips/kernel/setup.c, then perhaps we > > can move the definition of check_bugs_early there and mark it static > > __init and drop inline? > > Sure, we could even go a step further and just copy the body into the > one call site ourselves, I see little reason for this to be a dedicated > function. That is probably best done in a separate patch altogether in > lieu of just adding __init. I don't expect any new checks added to check_bugs_early so let's move the whole function into the call site. Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]