All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH 0/6] drm/i915: incidental -EPERM considered harmful
@ 2021-09-30 11:24 Jani Nikula
  2021-09-30 11:24 ` [Intel-gfx] [PATCH 1/6] drm/i915/dsi: pass struct mipi_dsi_packet pointer, not the entire struct Jani Nikula
                   ` (8 more replies)
  0 siblings, 9 replies; 12+ messages in thread
From: Jani Nikula @ 2021-09-30 11:24 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula

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


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-10-01  8:50 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-30 11:24 [Intel-gfx] [PATCH 0/6] drm/i915: incidental -EPERM considered harmful Jani Nikula
2021-09-30 11:24 ` [Intel-gfx] [PATCH 1/6] drm/i915/dsi: pass struct mipi_dsi_packet pointer, not the entire struct Jani Nikula
2021-09-30 11:24 ` [Intel-gfx] [PATCH 2/6] drm/i915/dsi: fuse dsi_send_pkt_payld() and add_payld_to_queue() Jani Nikula
2021-09-30 11:24 ` [Intel-gfx] [PATCH 3/6] drm/i915/dsi: return -EBUSY instead of -1 Jani Nikula
2021-09-30 11:24 ` [Intel-gfx] [PATCH 4/6] drm/i915/hdmi: return -EINVAL " Jani Nikula
2021-09-30 11:24 ` [Intel-gfx] [PATCH 5/6] drm/i915/drv: return -EIO " Jani Nikula
2021-09-30 11:24 ` [Intel-gfx] [PATCH 6/6] drm/i915/dram: return -ENOENT " Jani Nikula
2021-09-30 12:21   ` Ville Syrjälä
2021-10-01  8:50     ` Jani Nikula
2021-09-30 15:08 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: incidental -EPERM considered harmful Patchwork
2021-09-30 20:45 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: incidental -EPERM considered harmful (rev2) Patchwork
2021-10-01  1:54 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.