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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 98F27C7EE2C for ; Tue, 6 Jun 2023 09:45:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 274BA10E329; Tue, 6 Jun 2023 09:45:27 +0000 (UTC) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id EBE9F10E327; Tue, 6 Jun 2023 09:45:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686044724; x=1717580724; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=sUKN7tyxrJH3vsqeq3Bl+B1Au0rz1W/aaAamLU/PTe0=; b=bZxhUHP6YGrC6Id7TLHRWiGlY+1Woxmypw3TeZ8nbTVPCMDyHvYBkRPO WEwqU3BXNExtqTTFKBBHTK+8ympqvEpkOv6fFVicPzXXZamoacn0wQyr+ fSwGV91WXfx656cGEeCtVdez281IWDyLD+hf5mglyt2xREsLwMx8klX/4 vSfrI6smf28DhLVgRHBf2kh4f/lNct4YGLP4fe0APa7ug2OC9unnpJ9Vb exy3ZCClKrTLWRlV+CjKl58sgUJFhaGlH6BY9yp6CnQa9h3DGqGZeVQPi iYuGIw9NSDuqLOpBY5u+5vm0bv+5NZqvu3YwKkEF1YJI9yhJ462GoCUe9 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10732"; a="355472317" X-IronPort-AV: E=Sophos;i="6.00,219,1681196400"; d="scan'208";a="355472317" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jun 2023 02:44:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10732"; a="742080595" X-IronPort-AV: E=Sophos;i="6.00,219,1681196400"; d="scan'208";a="742080595" Received: from wacarey-mobl1.ger.corp.intel.com (HELO [10.213.192.12]) ([10.213.192.12]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jun 2023 02:44:52 -0700 Message-ID: Date: Tue, 6 Jun 2023 10:44:50 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Content-Language: en-US To: Andi Shyti References: <20230605131135.396854-1-tvrtko.ursulin@linux.intel.com> From: Tvrtko Ursulin Organization: Intel Corporation UK Plc In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Intel-gfx] [PATCH] drm/i915/selftests: Add some missing error propagation 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: , Cc: Intel-gfx@lists.freedesktop.org, Dan Carpenter , dri-devel@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On 05/06/2023 14:47, Andi Shyti wrote: > Hi Tvrtko, > >> Add some missing error propagation in live_parallel_switch. >> >> To avoid needlessly burdening the various backport processes, note I am >> not marking it as a fix against any patches and not copying stable since >> it is debug/selftests only code. > > which I did :/ > > But I guess you are right and it's not necessary. > >> Signed-off-by: Tvrtko Ursulin >> Reported-by: Dan Carpenter >> Cc: Andi Shyti >> --- >> .../gpu/drm/i915/gem/selftests/i915_gem_context.c | 14 ++++++++++---- >> 1 file changed, 10 insertions(+), 4 deletions(-) >> >> diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c b/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c >> index ad6a3b2fb387..7021b6e9b219 100644 >> --- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c >> +++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c >> @@ -348,8 +348,10 @@ static int live_parallel_switch(void *arg) >> continue; >> >> ce = intel_context_create(data[m].ce[0]->engine); >> - if (IS_ERR(ce)) >> + if (IS_ERR(ce)) { >> + err = PTR_ERR(ce); >> goto out; >> + } >> >> err = intel_context_pin(ce); >> if (err) { >> @@ -369,8 +371,10 @@ static int live_parallel_switch(void *arg) >> >> worker = kthread_create_worker(0, "igt/parallel:%s", >> data[n].ce[0]->engine->name); >> - if (IS_ERR(worker)) >> + if (IS_ERR(worker)) { >> + err = PTR_ERR(worker); >> goto out; >> + } >> >> data[n].worker = worker; >> } >> @@ -399,8 +403,10 @@ static int live_parallel_switch(void *arg) >> } >> } >> >> - if (igt_live_test_end(&t)) >> - err = -EIO; >> + if (igt_live_test_end(&t)) { >> + err = err ?: -EIO; > > Nice catch! > > Reviewed-by: Andi Shyti Thanks, pushed! (with Fixes tags added) Regards, Tvrtko