Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • L linux
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • linux
  • Repository
You need to sign in or sign up before continuing.
  • linux
  • scripts
  • kernel-doc
Find file BlameHistoryPermalink
  • Mauro Carvalho Chehab's avatar
    scripts: kernel-doc: fix parsing function-like typedefs · 7d2c6b1e
    Mauro Carvalho Chehab authored Dec 02, 2020
    Changeset 6b80975c ("scripts: kernel-doc: fix typedef parsing")
    added support for things like:
    
    	typedef unsigned long foo();
    
    However, it caused a regression on this prototype:
    
    	typedef bool v4l2_check_dv_timings_fnc(const struct v4l2_dv_timings *t, void *handle);
    
    This is only noticed after adding a patch that checks if the
    kernel-doc identifier matches the typedef:
    
    	./scripts/kernel-doc -none $(git grep '^.. kernel-doc::' Documentation/ |cut -d ' ' -f 3|sort|uniq) 2>&1|grep expecting
    	include/media/v4l2-dv-timings.h:38: warning: expecting prototype for typedef v4l2_check_dv_timings_fnc. Prototype was for typedef nc instead
    
    The problem is that, with the new parsing logic, it is not
    checking for complete words at the type part.
    
    Fix it by adding a \b at the end of each type word at the
    regex.
    
    fixes: 6b80975c
    
     ("scripts: kernel-doc: fix typedef parsing")
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Link: https://lore.kernel.org/r/218ff56dcb8e73755005d3fb64586eb1841a276b.1606896997.git.mchehab+huawei@kernel.org
    
    
    Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
    7d2c6b1e
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7