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 D385CC433F5 for ; Fri, 1 Oct 2021 08:50:58 +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 967E76108F for ; Fri, 1 Oct 2021 08:50:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 967E76108F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=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 232396E44A; Fri, 1 Oct 2021 08:50:58 +0000 (UTC) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3527E6E44A for ; Fri, 1 Oct 2021 08:50:56 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6200,9189,10123"; a="225455390" X-IronPort-AV: E=Sophos;i="5.85,337,1624345200"; d="scan'208";a="225455390" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Oct 2021 01:50:55 -0700 X-IronPort-AV: E=Sophos;i="5.85,337,1624345200"; d="scan'208";a="564835572" Received: from kdoertel-mobl.ger.corp.intel.com (HELO localhost) ([10.251.222.34]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Oct 2021 01:50:53 -0700 From: Jani Nikula To: Ville =?utf-8?B?U3lyasOkbMOk?= Cc: intel-gfx@lists.freedesktop.org In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: Date: Fri, 01 Oct 2021 11:50:49 +0300 Message-ID: <87r1d5t9g6.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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, 30 Sep 2021, Ville Syrj=C3=A4l=C3=A4 wrote: > On Thu, Sep 30, 2021 at 02:24:36PM +0300, Jani Nikula wrote: >> Avoid using the incidental -EPERM. >>=20 >> Signed-off-by: Jani Nikula >> --- >> drivers/gpu/drm/i915/intel_dram.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >>=20 >> diff --git a/drivers/gpu/drm/i915/intel_dram.c b/drivers/gpu/drm/i915/in= tel_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=20 > 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. Exceptionally fixed this while pushing. > > Series is > Reviewed-by: Ville Syrj=C3=A4l=C3=A4 Thanks, pushed. BR, Jani. > >> } >> } 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; >> } >> } >>=20=20 >> --=20 >> 2.30.2 --=20 Jani Nikula, Intel Open Source Graphics Center