Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 6/6] drm/i915/dram: return -ENOENT instead of -1
Date: Thu, 30 Sep 2021 15:21:35 +0300	[thread overview]
Message-ID: <YVWrz/hS3K/2orF9@intel.com> (raw)
In-Reply-To: <e2f79220ed2558f615c051e2533275a5dae1a04f.1633000838.git.jani.nikula@intel.com>

On Thu, Sep 30, 2021 at 02:24:36PM +0300, Jani Nikula wrote:
> Avoid using the incidental -EPERM.
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_dram.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dram.c b/drivers/gpu/drm/i915/intel_dram.c
> index 91866520c173..a506a2196de4 100644
> --- a/drivers/gpu/drm/i915/intel_dram.c
> +++ b/drivers/gpu/drm/i915/intel_dram.c
> @@ -444,7 +444,7 @@ static int icl_pcode_read_mem_global_info(struct drm_i915_private *dev_priv)
>  			break;
>  		default:
>  			MISSING_CASE(val & 0xf);
> -			return -1;
> +			return -ENOENT;

Everything else is -EINVAL in that file. So maybe just stick to 
that? I guess for a bunch of these maybe something different
might make sense to indicate that it's the hw telling us nonsense
(or the driver is actually missing some necessaty stuff).
But boesn't really matter since it's just a bogus value.

Series is
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

>  		}
>  	} else {
>  		switch (val & 0xf) {
> @@ -462,7 +462,7 @@ static int icl_pcode_read_mem_global_info(struct drm_i915_private *dev_priv)
>  			break;
>  		default:
>  			MISSING_CASE(val & 0xf);
> -			return -1;
> +			return -ENOENT;
>  		}
>  	}
>  
> -- 
> 2.30.2

-- 
Ville Syrjälä
Intel

  reply	other threads:[~2021-09-30 12:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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ä [this message]
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=YVWrz/hS3K/2orF9@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    /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