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
  • mod
  • modpost.c
Find file BlameHistoryPermalink
  • Masahiro Yamada's avatar
    modpost: define TO_NATIVE() using bswap_* functions · bd78c9d7
    Masahiro Yamada authored Oct 08, 2023
    
    
    The current TO_NATIVE() has some limitations:
    
     1) You cannot cast the argument.
    
     2) You cannot pass a variable marked as 'const'.
    
     3) Passing an array is a bug, but it is not detected.
    
    Impelement TO_NATIVE() using bswap_*() functions. These are GNU
    extensions. If we face portability issues, we can port the code from
    include/uapi/linux/swab.h.
    
    With this change, get_rel_type_and_sym() can be simplified by casting
    the arguments directly.
    
    Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
    Reviewed-by: default avatarNick Desaulniers <ndesaulniers@google.com>
    bd78c9d7
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7