From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757450Ab3I2UCu (ORCPT ); Sun, 29 Sep 2013 16:02:50 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:59242 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755376Ab3I2T1f (ORCPT ); Sun, 29 Sep 2013 15:27:35 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Daniel Santos , Randy Dunlap , Michal Marek , Andrew Morton , Linus Torvalds , Ben Hutchings Subject: [ 22/22] kernel-doc: bugfix - multi-line macros Date: Sun, 29 Sep 2013 12:27:08 -0700 Message-Id: <20130929191200.404005751@linuxfoundation.org> X-Mailer: git-send-email 1.8.4.6.g82e253f.dirty In-Reply-To: <20130929191158.889693326@linuxfoundation.org> References: <20130929191158.889693326@linuxfoundation.org> User-Agent: quilt/0.60-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Daniel Santos commit 654784284430bf2739985914b65e09c7c35a7273 upstream. Prior to this patch the following code breaks: /** * multiline_example - this breaks kernel-doc */ #define multiline_example( \ myparam) Producing this error: Error(somefile.h:983): cannot understand prototype: 'multiline_example( \ ' This patch fixes the issue by appending all lines ending in a blackslash (optionally followed by whitespace), removing the backslash and any whitespace after it prior to appending (just like the C pre-processor would). This fixes a break in kerel-doc introduced by the additions to rbtree.h. Signed-off-by: Daniel Santos Cc: Randy Dunlap Cc: Michal Marek Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Cc: Ben Hutchings Signed-off-by: Greg Kroah-Hartman --- scripts/kernel-doc | 3 +++ 1 file changed, 3 insertions(+) --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -2045,6 +2045,9 @@ sub process_file($) { $section_counter = 0; while () { + while (s/\\\s*$//) { + $_ .= ; + } if ($state == 0) { if (/$doc_start/o) { $state = 1; # next line is always the function name