From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on archive.lwn.net X-Spam-Level: X-Spam-Status: No, score=-5.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham autolearn_force=no version=3.4.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by archive.lwn.net (Postfix) with ESMTP id 43CE67D082 for ; Thu, 18 Oct 2018 18:22:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727955AbeJSCY0 (ORCPT ); Thu, 18 Oct 2018 22:24:26 -0400 Received: from ms.lwn.net ([45.79.88.28]:44936 "EHLO ms.lwn.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726424AbeJSCY0 (ORCPT ); Thu, 18 Oct 2018 22:24:26 -0400 Received: from localhost.localdomain (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ms.lwn.net (Postfix) with ESMTPSA id CFD2597E; Thu, 18 Oct 2018 18:22:07 +0000 (UTC) Date: Thu, 18 Oct 2018 12:21:55 -0600 From: Jonathan Corbet To: Randy Dunlap Cc: "linux-doc@vger.kernel.org" , LKML , Kees Cook , Jani Nikula Subject: Re: [PATCH] kernel-doc: fix declaration type determination Message-ID: <20181018122155.4fe8dc01@lwn.net> In-Reply-To: <640b26f4-a6fa-ffbc-c866-ea03de4f79a5@infradead.org> References: <640b26f4-a6fa-ffbc-c866-ea03de4f79a5@infradead.org> Organization: LWN.net X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Sender: linux-doc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org On Wed, 17 Oct 2018 21:07:27 -0700 Randy Dunlap wrote: > From: Randy Dunlap > > Make declaration type determination more robust. > > When scripts/kernel-doc is deciding if some kernel-doc notation > contains an enum, a struct, a union, a typedef, or a function, > it does a pattern match on the beginning of the string, looking > for a match with one of "struct", "union", "enum", or "typedef", > and otherwise defaults to a function declaration type. > However, if a function or a function-like macro has a name that > begins with "struct" (e.g., struct_size()), then kernel-doc > incorrectly decides that this is a struct declaration. > > Fix this by looking for the declaration type keywords having an > ending word boundary (\b), so that "struct_size" will not match > a struct declaration. > > I compared lots of html before/after output from core-api, driver-api, > and networking. There were no differences in any of the files that > I checked. > > Signed-off-by: Randy Dunlap Applied, thanks. jon