This patch series cleans up redundant IS_ERR_OR_NULL() checks in the
nouveau GSP-RM code.

The core GSP-RM functions already return error pointers via IS_ERR()
checks. Using IS_ERR_OR_NULL() is redundant and adds unnecessary NULL
checks.

This series is organized as follows:
- Patch 1: Cleanup IS_ERR_OR_NULL in nvkm_gsp_rm_alloc_get/alloc
- Patch 2: Cleanup IS_ERR_OR_NULL in nvkm_gsp_rpc_rd
- Patch 3: Cleanup IS_ERR_OR_NULL in core implementation
- Patch 4: Cleanup WARN_ON(IS_ERR_OR_NULL) across multiple files
- Patch 5: Cleanup remaining IS_ERR_OR_NULL usage

After this cleanup:
- Error handling is consistent with the rest of the kernel
- Code is simpler and more maintainable
- The intent is clearer (checking for error pointers, not NULL)

Hongling Zeng (5):
  nouveau/gsp: cleanup IS_ERR_OR_NULL in rm_alloc functions
  nouveau/gsp: cleanup IS_ERR_OR_NULL in rpc_rd
  nouveau/gsp/rm: cleanup IS_ERR_OR_NULL in core implementation
  nouveau/gsp/rm: cleanup WARN_ON(IS_ERR_OR_NULL)
  nouveau/gsp/rm: cleanup remaining IS_ERR_OR_NULL usage

 drivers/gpu/drm/nouveau/include/nvkm/subdev/gsp.h    | 4 ++--
 .../gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/alloc.c  | 4 ++--
 .../gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/bar.c   | 2 +-
 .../gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/ctrl.c  | 2 +-
 .../gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/nvenc.c | 2 +-
 .../gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/ofa.c   | 2 +-
 .../gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/rpc.c   | 8 ++++----
 7 files changed, 14 insertions(+), 14 deletions(-)

--
2.25.1

Reply via email to