Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1694711pxv; Fri, 16 Jul 2021 15:45:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz02TXpRs+o7J3WImFEQdMY0hjEpvHUrDoReSYBhwQne8SejCazTgj1NHgHDNoB4ZrOfXaz X-Received: by 2002:a17:906:2bdb:: with SMTP id n27mr14342214ejg.312.1626475541906; Fri, 16 Jul 2021 15:45:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626475541; cv=none; d=google.com; s=arc-20160816; b=IguShIhsnfBoaKOpUltr8BQb5X9UMBiwKMuj31muh8/gsUco0MZSGOTBljzP5rC0ln Fzap3W97Q2fIbZS4GKvbI8B66xA6p9o1IbKHl4cSg73fB/c7KQ8ezNZZhujDKyh8t1ap 4kx8IIB3ZzPxpldCctq3+oMDkEkbpPG87+1iGK5WH3njtNKJMXpgMVZPM/QV/mp9/zmU ZLbg9gsYROJCt0x2oy6NIXE97yC52WQ06h5nCQEgUbd3YOsDUrbSLvPI0urVdb5Uom+J oJDr8fAsLeUX9p6d3huzqgdDMyXER+5NegPHhY5utr09gl2ca/d95gUdvTVxofhRyazF fMXA== 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=ACWCOVa1aQ95w8rqnSQaJXN6rrUqsuZFaujO3dgdpag=; b=pl1f1HjQB18weLPfZUJ81i0SA+nWVINUYbaunwSa4WdzWgiOPH6ZOmUH604V+DILa8 lVVcFzl4hJarSFLrzp7jSGMYWoI9Lch7UcrxfUHqMAgRNH2K0D8Z8FEPTQoQW2IdF41r oQcg+mH9LVus3n1m/ap6dInbVKxrlelU1rfJVt5mJPEG7Bran/6eYdO+fGv0ygEeWcsG lNlU+kmLxsQ5z7Rm8ARSGV9CbgqJ38kjuXK9J5MRZEdq/mJZEonYXFyjm8ZLdDSxJzJn 64G36H1g3bbMUzfxO+91QHxH2VlgE+gOVIFzerqHbE8anAooOdmVLrjtJ7kPjMhy2RC6 hAng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="jRzcMCH/"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w9si13652884edx.175.2021.07.16.15.45.19; Fri, 16 Jul 2021 15:45:41 -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=@kernel.org header.s=k20201202 header.b="jRzcMCH/"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232532AbhGPWrV (ORCPT + 99 others); Fri, 16 Jul 2021 18:47:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:45588 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230227AbhGPWrV (ORCPT ); Fri, 16 Jul 2021 18:47:21 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 66878613DF; Fri, 16 Jul 2021 22:44:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626475465; bh=+OtcNEH2sKfz8tajetndVWNnt7tYpjOCK9SU/b98tao=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jRzcMCH/WjUxv97dnBAZ4X0kYnhoD5Npnt4MhsENvjeJ/2rxDWwAfIXfVLHbTbPWZ 5uNPIkKUus4JNKc6TT95RCjeDZchP8866bfmZgVOI0T2b0+hLdofOqZueCtShss9iI zpbe80RFG6Qra0fsMtbYySfMHljnM4qA2jYpybJreCEVZZ7VcCsQjxnW0XzQn/iFC2 BiK+oGb3JGbnWaSBbpeUj/ShEpviMpbSbkF3/UqYQj5ndZGUqB0ChgNYDUgwnRZAMT oAYSw8JBHFkTodLmyTNjhNn9LTyDvog8N0zByBQRW1Iqlza+9TCExHkH8/OrfdivY4 01azUqG4Wm1Ww== Date: Fri, 16 Jul 2021 15:44:21 -0700 From: Nathan Chancellor To: Colin King Cc: Valentin Schneider , Peter Zijlstra , Ingo Molnar , kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH][next] smpboot: remove inline from __always_inline'd function idle_init Message-ID: References: <20210715164018.62712-1-colin.king@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210715164018.62712-1-colin.king@canonical.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 15, 2021 at 05:40:18PM +0100, Colin King wrote: > From: Colin Ian King > > Declaring a idle_init as inline when it is __always_inline is redundant > so this can be removed. Also swap the order of __always_inline and void > to match the more usual coding style. > > Signed-off-by: Colin Ian King This resolves a clang warning that I see: kernel/smpboot.c:50:20: error: duplicate 'inline' declaration specifier [-Werror,-Wduplicate-decl-specifier] static inline void __always_inline idle_init(unsigned int cpu) ^ ./include/linux/compiler_attributes.h:65:41: note: expanded from macro '__always_inline' #define __always_inline inline __attribute__((__always_inline__)) ^ ./include/linux/compiler_types.h:149:16: note: expanded from macro 'inline' #define inline inline __gnu_inline __inline_maybe_unused notrace ^ 1 error generated. Reviewed-by: Nathan Chancellor > --- > kernel/smpboot.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/smpboot.c b/kernel/smpboot.c > index 21b7953f8242..cf6acab78538 100644 > --- a/kernel/smpboot.c > +++ b/kernel/smpboot.c > @@ -47,7 +47,7 @@ void __init idle_thread_set_boot_cpu(void) > * > * Creates the thread if it does not exist. > */ > -static inline void __always_inline idle_init(unsigned int cpu) > +static __always_inline void idle_init(unsigned int cpu) > { > struct task_struct *tsk = per_cpu(idle_threads, cpu); > > -- > 2.31.1 >