diff mbox series

[2/2] clocksource: arm_arch_timer: fix DEFINE_PER_CPU expansion

Message ID 20171016152839.14964-3-mark.rutland@arm.com
State Superseded
Headers show
Series [1/2] clocksource: arm_arch_timer: validate CNTFRQ after enabling frame | expand

Commit Message

Mark Rutland Oct. 16, 2017, 3:28 p.m. UTC
Our ctags mangling script can't handle newlines inside of a
DEFINE_PER_CPU(), leading to an annoying message whenever tags are
built:

  ctags: Warning: drivers/clocksource/arm_arch_timer.c:302: null expansion of name pattern "\1"

This was dealt with elsewhere in commit:

  25528213fe9f75f4 ("tags: Fix DEFINE_PER_CPU expansions")

... by ensuring each DEFINE_PER_CPU() was contained on a single line,
even where this would violate the usual code style (checkpatch warnings
and all).

Let's do the same for the arch timer driver, and get rid of the
distraction.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>

Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
---
 drivers/clocksource/arm_arch_timer.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

-- 
2.11.0

Comments

Mark Rutland Oct. 16, 2017, 4:32 p.m. UTC | #1
On Mon, Oct 16, 2017 at 09:12:00AM -0700, Joe Perches wrote:
> Some of the definitions are very long and can't be split

> into multiple lines because ctags is limited.

> 

> Exempt these lines from the line length checks.

> 

> Signed-off-by: Joe Perches <joe@perches.com>


It might make sense to point at commit:

  25528213fe9f75f4 ("tags: Fix DEFINE_PER_CPU expansions")

... for the gory details, but either way:

Acked-by: Mark Rutland <mark.rutland@arm.com>


Thanks,
Mark.

> ---

>  scripts/checkpatch.pl | 5 +++--

>  1 file changed, 3 insertions(+), 2 deletions(-)

> 

> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl

> index 2a8c6c3c1bdb..5fa0f5467d99 100755

> --- a/scripts/checkpatch.pl

> +++ b/scripts/checkpatch.pl

> @@ -2900,8 +2900,9 @@ sub process {

>  				 $line =~ /^\+\s*#\s*define\s+\w+\s+$String$/) {

>  				$msg_type = "";

>  

> -			# EFI_GUID is another special case

> -			} elsif ($line =~ /^\+.*\bEFI_GUID\s*\(/) {

> +			# More special cases

> +			} elsif ($line =~ /^\+.*\bEFI_GUID\s*\(/ ||

> +				 $line =~ /^\+\s*(?:\w+)?\s*DEFINE_PER_CPU/) {

>  				$msg_type = "";

>  

>  			# Otherwise set the alternate message types
diff mbox series

Patch

diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
index 14e2419063e9..0ecf5beb56ec 100644
--- a/drivers/clocksource/arm_arch_timer.c
+++ b/drivers/clocksource/arm_arch_timer.c
@@ -299,8 +299,7 @@  static u64 notrace arm64_858921_read_cntvct_el0(void)
 #endif
 
 #ifdef CONFIG_ARM_ARCH_TIMER_OOL_WORKAROUND
-DEFINE_PER_CPU(const struct arch_timer_erratum_workaround *,
-	       timer_unstable_counter_workaround);
+DEFINE_PER_CPU(const struct arch_timer_erratum_workaround *, timer_unstable_counter_workaround);
 EXPORT_SYMBOL_GPL(timer_unstable_counter_workaround);
 
 DEFINE_STATIC_KEY_FALSE(arch_timer_read_ool_enabled);