Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • L linux-dm
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • linux-arm
  • linux-dm
  • Repository
  • linux-dm
  • tools
  • testing
  • nvdimm
  • test
  • nfit_test.h
Find file BlameHistoryPermalink
  • Nathan Chancellor's avatar
    libnvdimm/nfit_test: Fix acpi_handle redefinition · 59f08896
    Nathan Chancellor authored Sep 17, 2019
    After commit 62974fc3 ("libnvdimm: Enable unit test infrastructure
    compile checks"), clang warns:
    
    In file included from
    ../drivers/nvdimm/../../tools/testing/nvdimm/test/iomap.c:15:
    ../drivers/nvdimm/../../tools/testing/nvdimm/test/nfit_test.h:206:15:
    warning: redefinition of typedef 'acpi_handle' is a C11 feature
    [-Wtypedef-redefinition]
    typedef void *acpi_handle;
                  ^
    ../include/acpi/actypes.h:424:15: note: previous definition is here
    typedef void *acpi_handle;      /* Actually a ptr to a NS Node */
                  ^
    1 warning generated.
    
    The include chain:
    
    iomap.c ->
        linux/acpi.h ->
            acpi/acpi.h ->
                acpi/actypes.h
        nfit_test.h
    
    Avoid this by including linux/acpi.h in nfit_test.h, which allows us to
    remove both the typedef and the forward declaration of acpi_object.
    
    Link: https://github.com/ClangBuiltLinux/linux/issues/660
    
    
    Signed-off-by: default avatarNathan Chancellor <natechancellor@gmail.com>
    Reviewed-by: default avatarIra Weiny <ira.weiny@intel.com>
    Link: https://lore.kernel.org/r/20190918042148.77553-1-natechancellor@gmail.com
    
    
    Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
    59f08896