From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753652Ab1K1PnB (ORCPT ); Mon, 28 Nov 2011 10:43:01 -0500 Received: from youngberry.canonical.com ([91.189.89.112]:54181 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752573Ab1K1Pm6 (ORCPT ); Mon, 28 Nov 2011 10:42:58 -0500 From: Andy Whitcroft To: Andrew Morton Cc: Joe Perches , linux-kernel@vger.kernel.org, Andy Whitcroft Subject: [PATCH 03/11] checkpatch: ## is not a valid modifier Date: Mon, 28 Nov 2011 15:42:45 +0000 Message-Id: <1322494973-29225-4-git-send-email-apw@canonical.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1322494973-29225-1-git-send-email-apw@canonical.com> References: <1322494973-29225-1-git-send-email-apw@canonical.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Inserting a # into the modifiers list will incorrectly add the null string to the modifiers list, leading to an infinite loop. As neither of these is a valid modifier form simply ignore them. Reported-by: Joe Perches Signed-off-by: Andy Whitcroft --- scripts/checkpatch.pl | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index e07c36a..6dad5dd 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -1223,7 +1223,9 @@ sub possible { case| else| asm|__asm__| - do + do| + \#| + \#\#| )(?:\s|$)| ^(?:typedef|struct|enum)\b )}x; -- 1.7.5.4