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
  • Kees Cook's avatar
    kernel-doc: fix struct_group_tagged() parsing · 5f8e4007
    Kees Cook authored Apr 11, 2024
    
    
    kernel-doc emits a warning on struct_group_tagged() if you describe your
    struct group member:
    
    include/net/libeth/rx.h:69: warning: Excess struct member 'fp' description in 'libeth_fq'
    
    The code:
    
    /**
     * struct libeth_fq - structure representing a buffer queue
     * @fp: hotpath part of the structure
     * @pp: &page_pool for buffer management
    [...]
     */
    struct libeth_fq {
    	struct_group_tagged(libeth_fq_fp, fp,
    		struct page_pool	*pp;
    [...]
    	);
    
    When a struct_group_tagged() is encountered, we need to build a
    `struct TAG NAME;` from it, so that it will be treated as a valid
    embedded struct.
    Decouple the regex and do the replacement there. As far as I can see,
    this doesn't produce any new warnings on the current mainline tree.
    
    Reported-by: default avatarJakub Kicinski <kuba@kernel.org>
    Closes: https://lore.kernel.org/netdev/20240405212513.0d189968@kernel.org
    Fixes: 50d7bd38
    
     ("stddef: Introduce struct_group() helper macro")
    Signed-off-by: default avatarKees Cook <keescook@chromium.org>
    Co-developed-by: default avatarAlexander Lobakin <aleksander.lobakin@intel.com>
    Signed-off-by: default avatarAlexander Lobakin <aleksander.lobakin@intel.com>
    Reviewed-by: default avatarPrzemek Kitszel <przemyslaw.kitszel@intel.com>
    Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
    Link: https://lore.kernel.org/r/20240411093208.2483580-1-aleksander.lobakin@intel.com
    5f8e4007
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7