Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • 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
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • chendotjs
  • linux
  • Repository
  • linux
  • drivers
  • gpu
  • drm
  • amd
  • amdkfd
  • kfd_process.c
Find file BlameHistoryPermalink
  • Guenter Roeck's avatar
    drm/amd/amdkfd: Drop unnecessary NULL check after container_of · 6a593769
    Guenter Roeck authored May 21, 2021
    
    
    The first parameter passed to container_of() is the pointer to the work
    structure passed to the worker and never NULL. The NULL check on the
    result of container_of() is therefore unnecessary and misleading.
    Remove it.
    
    This change was made automatically with the following Coccinelle script.
    
    @@
    type t;
    identifier v;
    statement s;
    @@
    
    <+...
    (
      t v = container_of(...);
    |
      v = container_of(...);
    )
      ...
      when != v
    - if (\( !v \| v == NULL \) ) s
    ...+>
    
    Reviewed-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
    Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    6a593769