From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759891AbbCDSyx (ORCPT ); Wed, 4 Mar 2015 13:54:53 -0500 Received: from mail-wi0-f175.google.com ([209.85.212.175]:34979 "EHLO mail-wi0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757855AbbCDSyw (ORCPT ); Wed, 4 Mar 2015 13:54:52 -0500 Date: Wed, 4 Mar 2015 19:54:46 +0100 From: Ingo Molnar To: Borislav Petkov Cc: Darshana Padmadas , linux-kernel@vger.kernel.org, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, josh@joshtriplett.org Subject: Re: [PATCH 05/16] arch: x86: kernel: Make internal functions static in cpu/intel_cacheinfo.c Message-ID: <20150304185446.GB5110@gmail.com> References: <63cb1aefe4d19b7526fe1ae2fb8066152eba1c8b.1425473428.git.darshanapadmadas@gmail.com> <20150304184634.GA3526@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20150304184634.GA3526@pd.tnic> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Borislav Petkov wrote: > On Wed, Mar 04, 2015 at 07:02:07PM +0530, Darshana Padmadas wrote: > > cpu/intel_cacheinfo.c defines two functions amd_get_l3_disable_slot > > and amd_set_l3_disable_slot. No other file uses these functions. > > So make these static. > > > > This eliminates the following warnings: > > > > arch/x86/kernel/cpu/intel_cacheinfo.c:349:5: warning: no previous prototype for ‘amd_get_l3_disable_slot’ [-Wmissing-prototypes] > > arch/x86/kernel/cpu/intel_cacheinfo.c:427:5: warning: no previous prototype for ‘amd_set_l3_disable_slot’ [-Wmissing-prototypes] > > Please correct your commit message - this patch is making functions > static and not fixing -Wmissing-prototypes warnings. Also, go > through the rest of the patchset as I see other cases of this too. So mentioning the warning is OK as long as it's characterised as a tool that helped find these kernel inefficiencies. So a better commit message would be something like: cpu/intel_cacheinfo.c defines two functions amd_get_l3_disable_slot() and amd_set_l3_disable_slot(). No other file uses these functions. So make these static to reduce the kernel's size. This was found via -Wmissing-prototypes warnings: arch/x86/kernel/cpu/intel_cacheinfo.c:349:5: warning: no previous prototype for ‘amd_get_l3_disable_slot’ [-Wmissing-prototypes] arch/x86/kernel/cpu/intel_cacheinfo.c:427:5: warning: no previous prototype for ‘amd_set_l3_disable_slot’ [-Wmissing-prototypes] also note how we refer to function names in changelogs: 'amd_get_l3_disable_slot()', not 'amd_get_l3_disable_slot'. This style should be used for the other patches in this series as well, plus the feedback I gave for the extra prototype lines should be followed as well. Thanks, Ingo