[Intel-gfx] [PATCH 0/6] drm/i915: incidental -EPERM considered harmful

Jani Nikula jani.nikula at intel.com
Thu Sep 30 11:24:30 UTC 2021


I think using return -1 to indicate errors in kernel is generally a bad
idea. There are specific cases, such as returning invalid indexes, where
it might be justified, but functions that are expected to return actual
kernel error codes should return actual kernel error codes, not
incidental -EPERM.

Fix a handful of these cases as an example. I thought DSI needed a
little cleanup first instead of just making the conversion.

BR,
Jani.


Jani Nikula (6):
  drm/i915/dsi: pass struct mipi_dsi_packet pointer, not the entire
    struct
  drm/i915/dsi: fuse dsi_send_pkt_payld() and add_payld_to_queue()
  drm/i915/dsi: return -EBUSY instead of -1
  drm/i915/hdmi: return -EINVAL instead of -1
  drm/i915/drv: return -EIO instead of -1
  drm/i915/dram: return -ENOENT instead of -1

 drivers/gpu/drm/i915/display/icl_dsi.c    | 64 +++++++++--------------
 drivers/gpu/drm/i915/display/intel_hdmi.c |  2 +-
 drivers/gpu/drm/i915/i915_drv.c           |  7 +--
 drivers/gpu/drm/i915/intel_dram.c         |  4 +-
 4 files changed, 32 insertions(+), 45 deletions(-)

-- 
2.30.2



More information about the Intel-gfx mailing list