From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D00ADC433EF for ; Thu, 30 Sep 2021 12:21:41 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9B80D6136A for ; Thu, 30 Sep 2021 12:21:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 9B80D6136A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9C19D6E3F4; Thu, 30 Sep 2021 12:21:40 +0000 (UTC) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id B30D66E3F4 for ; Thu, 30 Sep 2021 12:21:38 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6200,9189,10122"; a="225213988" X-IronPort-AV: E=Sophos;i="5.85,336,1624345200"; d="scan'208";a="225213988" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Sep 2021 05:21:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,336,1624345200"; d="scan'208";a="487304669" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.171]) by orsmga008.jf.intel.com with SMTP; 30 Sep 2021 05:21:36 -0700 Received: by stinkbox (sSMTP sendmail emulation); Thu, 30 Sep 2021 15:21:35 +0300 Date: Thu, 30 Sep 2021 15:21:35 +0300 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Jani Nikula Cc: intel-gfx@lists.freedesktop.org Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Patchwork-Hint: comment Subject: Re: [Intel-gfx] [PATCH 6/6] drm/i915/dram: return -ENOENT instead of -1 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Thu, Sep 30, 2021 at 02:24:36PM +0300, Jani Nikula wrote: > Avoid using the incidental -EPERM. > > Signed-off-by: Jani Nikula > --- > 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ä > } > } 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