Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753078AbcDTASI (ORCPT ); Tue, 19 Apr 2016 20:18:08 -0400 Received: from shards.monkeyblade.net ([149.20.54.216]:38707 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751676AbcDTASG (ORCPT ); Tue, 19 Apr 2016 20:18:06 -0400 Date: Tue, 19 Apr 2016 20:18:01 -0400 (EDT) Message-Id: <20160419.201801.1678960326029844695.davem@davemloft.net> To: Julia.Lawall@lip6.fr Cc: m.grzeschik@pengutronix.de, kernel-janitors@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, mcgrof@kernel.org, josh@joshtriplett.org Subject: Re: [PATCH 2/5] arcnet: com90xx: add __init attribute From: David Miller In-Reply-To: <1460991338-9845-3-git-send-email-Julia.Lawall@lip6.fr> References: <1460991338-9845-1-git-send-email-Julia.Lawall@lip6.fr> <1460991338-9845-3-git-send-email-Julia.Lawall@lip6.fr> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Tue, 19 Apr 2016 17:18:03 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 981 Lines: 24 From: Julia Lawall Date: Mon, 18 Apr 2016 16:55:35 +0200 > Add __init attribute on a function that is only called from other __init > functions and that is not inlined, at least with gcc version 4.8.4 on an > x86 machine with allyesconfig. Currently, the function is put in the > .text.unlikely segment. Declaring it as __init will cause it to be put in > the .init.text and to disappear after initialization. > > The result of objdump -x on the function before the change is as follows: > > 0000000000000000 l F .text.unlikely 00000000000000bf check_mirror > > And after the change it is as follows: > > 0000000000000000 l F .init.text 00000000000000ba check_mirror > > Done with the help of Coccinelle. The semantic patch checks for local > static non-init functions that are called from an __init function and are > not called from any other function. > > Signed-off-by: Julia Lawall Applied to net-next, thanks.