Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
mesa
mesa
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2,360
    • Issues 2,360
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 672
    • Merge Requests 672
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Mesa
  • mesamesa
  • Merge Requests
  • !7941

Merged
Opened Dec 05, 2020 by Rob Clark@robclark💬Owner

util+treewide: container_of() cleanup

  • Overview 28
  • Commits 3
  • Pipelines 15
  • Changes 21

Replace mesa's slightly different container_of() with one more aligned to the linux kernel's version which takes a type as the 2nd param. This avoids silly warnings like:

freedreno_context.c:396:44: warning: variable 'batch' is uninitialized when used within its own initialization [-Wuninitialized]

At the same time, we can add additional build-time type-checking asserts

@kusma @jenatali I think I've covered the MSVC case sufficiently? At least the vs2019 CI job seems happy..

@majanes I updated my meson args based on what you are using, but can't rule out some difference due to missing -devel pkg, etc.. so you might want to feed this to at least the build-test steps in your CI?

Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Reference: mesa/mesa!7941
Source branch: wip/container-of-cleanup