From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753311AbbJGJrV (ORCPT ); Wed, 7 Oct 2015 05:47:21 -0400 Received: from mail-wi0-f179.google.com ([209.85.212.179]:36936 "EHLO mail-wi0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752075AbbJGJrR (ORCPT ); Wed, 7 Oct 2015 05:47:17 -0400 Subject: Re: [PATCH v1] clocksource: Sigma Designs Tango 27 MHz xtal To: Marc Gonzalez , Thomas Gleixner References: <5613E45C.5020208@sigmadesigns.com> <5614549F.2070002@linaro.org> <5614D66A.1060402@sigmadesigns.com> Cc: LKML , Mans Rullgard , Mason From: Daniel Lezcano Message-ID: <5614EA23.5080503@linaro.org> Date: Wed, 7 Oct 2015 11:47:15 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <5614D66A.1060402@sigmadesigns.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/07/2015 10:23 AM, Marc Gonzalez wrote: [ ... ] >>> +++ b/drivers/clocksource/tango_xtal.c >>> @@ -0,0 +1,46 @@ >>> +#include >>> +#include >>> +#include >>> +#include >>> +#include >> >> #include is missing. > > For my education: this header is already indirectly included; > The directive should be explicit to prevent breakage in case > other (implicit) includes are reorganized? Yes, exactly. The 'clocksource.h' header includes 'init.h' only for the 'clocksource_default_clock' function. If this function disappears, or the __init section is removed, then the 'init.h' inclusion won't make sense anymore in the header file. By removing it, that will break all code relying on the implicit inclusion. So the rule of thumb I apply to myself is always to explicitly include the headers in the C file even if it is already implicitly included. This rule is valid only if the header file is not using intensively code coming from the implicit inclusion like static inlines etc ... >>> +static void __iomem *xtal_in_cnt; >>> +static struct delay_timer delay_timer; >>> + >>> +static unsigned long read_xtal_counter(void) >>> +{ >>> + return readl_relaxed(xtal_in_cnt); >>> +} >>> + >>> +static u64 read_sched_clock(void) >>> +{ >>> + return read_xtal_counter(); >>> +} >> >> static u64 *notrace* read_sched_clock(void) > > What about read_clocksource? and read_xtal_counter? See commit 89e6a13b88. -- Daniel -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog