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 01634C7EE24 for ; Mon, 5 Jun 2023 13:47:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E7AE410E2A2; Mon, 5 Jun 2023 13:47:51 +0000 (UTC) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7F0B510E29F; Mon, 5 Jun 2023 13:47:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1685972869; x=1717508869; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=pc0PP/0VU8hPz88rgPCZHCe9veRH3TDuhBiQ70XwYp8=; b=YI/WWjULw54GZx8ThJJ3ACi9yVJZxF+gIPIBsU6isijr3WtGSOhzVrQy /MItIXA0CtT+QbqgzbzZMg6US5Gkr19OBvY4DIebs+yu1w8V+7Z/yPhTm pAy3DETdImFd3iZIxvZQMpfJUbdQpWckvDiSWdphLYNGP/mVB73VRRveD nccRXSU5nN0dVynp4/TN9K5fuaDKd1KaVZtxW6INnRKvpA6RlPhBdlgtq DoeiBIZ2w1HyayZhSqCtYvSBJ6ZLZhvAi4dKGjWy3Z+RjuKCsTvPUwEbP 368HDD48BkCIrRVWmvdHydv2mYWhWj6VsQw0CaEaKU+YL6HQtG7NoBHBU g==; X-IronPort-AV: E=McAfee;i="6600,9927,10732"; a="355224252" X-IronPort-AV: E=Sophos;i="6.00,217,1681196400"; d="scan'208";a="355224252" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2023 06:47:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10732"; a="702757821" X-IronPort-AV: E=Sophos;i="6.00,217,1681196400"; d="scan'208";a="702757821" Received: from twgeistx-mobl.ger.corp.intel.com (HELO intel.com) ([10.249.42.176]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2023 06:47:45 -0700 Date: Mon, 5 Jun 2023 15:47:30 +0200 From: Andi Shyti To: Tvrtko Ursulin Message-ID: References: <20230605131135.396854-1-tvrtko.ursulin@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230605131135.396854-1-tvrtko.ursulin@linux.intel.com> 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" 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 Andi > + break; > + } > } > > out: > -- > 2.39.2