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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux