public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: jani.nikula@intel.com
Subject: [Intel-gfx] [PATCH 0/6] drm/i915: incidental -EPERM considered harmful
Date: Thu, 30 Sep 2021 14:24:30 +0300	[thread overview]
Message-ID: <cover.1633000838.git.jani.nikula@intel.com> (raw)

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


             reply	other threads:[~2021-09-30 11:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-30 11:24 Jani Nikula [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1633000838.git.jani.nikula@intel.com \
    --to=jani.nikula@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox