Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1598621pxb; Mon, 8 Mar 2021 01:20:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJwC/xi4BJcFr1T/r8QNOi3ND970qBXnsB7fOw1ntmDj76tZAIzXi8WijkZITPGqMAiSfz1m X-Received: by 2002:a17:906:bc81:: with SMTP id lv1mr14124019ejb.135.1615195232306; Mon, 08 Mar 2021 01:20:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615195232; cv=none; d=google.com; s=arc-20160816; b=axbKyx29BgtRlboAtAv6LrJSqLgQ7yuFcfWWITb8ZkfJGRx3DI3DWrexQ4j65BGnhz op7HJtYaJG0Yqgl9gBYIXvPP++VdDOK92X0SzvjhSRi2lxJEj6XGDiujdTaQ7M863B3Z /B2ooupkLO8J6D99rmSaDKLEU6c8tzJIDh6lAumkLJSQ3Ar9Mvv1DWIjVyFRg/l2LGCw 3xDQ0rYSQbuKB2xqp59Imflyyyfgm1wOFAJNbP0hyEgqynZHzudphtEqcFA177ZeFKV7 642q1YI2m3zMhlNwr80RNOlGOrbdcoeuzo/2HT34KsudLt6lixN3UqmdWx4u4t02oWj6 81Og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:date:to:cc:from:subject :references:in-reply-to:content-transfer-encoding:mime-version; bh=4IdIig/aZF1X244xipFFLD6yn/r/O3TQ5AA6z5rQN+o=; b=Uk2cb9g+3hkWZBip4bLJzGjaXdk1GGhwEAOsmjgk+HvcP1O59VuUU0FSR1RnLdCjA3 gfBNlz7eoFGSED9Uw6jr0tV3IIhpjvzHavk+WKqIxDc88hQxY9UuRT0SLddkbuTMkdro 9pamPEgUwnIF2t0P5uxKsiJzi3a2KvV9ixMzPG7TLeCBPOcSGzVhittYIQ1KphjZZeQH MF1sOmugJgdUZXQbAaHTdgYXYJLnVBAFj2/GETFHy4LOJzi+vZX9eJHmUXmU68BSkapu XCrQUeYutQfDzF35SXiJgI5g2/sYBXSnjrDbvelrR+JkSyH/x1Xsgs34ciEhlzhCA374 TyGg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id sb25si6926654ejb.340.2021.03.08.01.20.10; Mon, 08 Mar 2021 01:20:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229730AbhCHJTI convert rfc822-to-8bit (ORCPT + 99 others); Mon, 8 Mar 2021 04:19:08 -0500 Received: from mail.fireflyinternet.com ([77.68.26.236]:53265 "EHLO fireflyinternet.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S229458AbhCHJSh (ORCPT ); Mon, 8 Mar 2021 04:18:37 -0500 X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.69.177; Received: from localhost (unverified [78.156.69.177]) by fireflyinternet.com (Firefly Internet (M1)) with ESMTP (TLS) id 24038370-1500050 for multiple; Mon, 08 Mar 2021 09:18:20 +0000 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT In-Reply-To: <20210308085952.8153-1-baijiaju1990@gmail.com> References: <20210308085952.8153-1-baijiaju1990@gmail.com> Subject: Re: [PATCH] gpu: drm: i915: fix error return code of igt_buddy_alloc_smoke() From: Chris Wilson Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Jia-Ju Bai To: Jia-Ju Bai , airlied@linux.ie, daniel@ffwll.ch, jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com, lkml@SDF.ORG, matthew.auld@intel.com, rodrigo.vivi@intel.com Date: Mon, 08 Mar 2021 09:18:16 +0000 Message-ID: <161519509650.8241.14778072091965189208@build.alporthouse.com> User-Agent: alot/0.9 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Jia-Ju Bai (2021-03-08 08:59:52) > When i915_random_order() returns NULL to order, no error return code of > igt_buddy_alloc_smoke() is assigned. > To fix this bug, err is assigned with -EINVAL in this case. It would not be EINVAL since that is used for a reference failure, but in this case the idea was to return 0 as no testing was done and the ENOMEM was raised before testing began i.e. not an internal and unexpected driver allocation failure. -Chris