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 8EA55C001E0 for ; Mon, 23 Oct 2023 11:00:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EC3DB10E1AE; Mon, 23 Oct 2023 11:00:04 +0000 (UTC) Received: from fanzine2.igalia.com (fanzine.igalia.com [178.60.130.6]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7D4EE10E1AC for ; Mon, 23 Oct 2023 11:00:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=kjlw/hFajWEkad4BTTJuNeTTMo5oMTr0YLm0Dd5Fys0=; b=RKHx6fOF1tgfzsIJTHbGTI9ajN gyqdwkhTv+cgaTnCbeLB/Zqft9PKJGnszMH0R+FYD2XY8XEsezqVkY4tZC4Fi75GDUsAfHeqDc/Ha woKmOahBx7HNF7RN6lsjPj1Sx3GHK68xXSNdvptDYdTwBjGmuJvEMqfbhwZ3oE+5mbqKqLzveVOVl nnW2U3m3qLTHJCKquR6/z74PREBEFXTtRVUJ2GpaUWZL5k+WCrD2tZHvT0Eh7eyODSKeUG5i2NMeU 9iUVD0wLCNGCKLsZmNVALrswmOK4eo0tdznh3xf3MycFWKLXKMiEzb4g3K85tMTvWjd8bm6RwM2D5 XSBXiXgg==; Received: from [177.34.168.16] (helo=morissey..) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1qusf2-005YGM-Jx; Mon, 23 Oct 2023 12:59:53 +0200 From: =?UTF-8?q?Ma=C3=ADra=20Canal?= To: Emma Anholt , Melissa Wen , Iago Toral , David Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann Subject: [PATCH 2/2] drm/v3d: assure that the job is NULL after being freed Date: Mon, 23 Oct 2023 07:58:34 -0300 Message-ID: <20231023105927.101502-2-mcanal@igalia.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231023105927.101502-1-mcanal@igalia.com> References: <20231023105927.101502-1-mcanal@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Ma=C3=ADra=20Canal?= , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" After the job is finished and freed, we need to make sure that the job is NULL. Otherwise, we would get a warning when unloading the driver, as it would look like the job still exists. Therefore, after freeing the job, let's assign it to NULL in order to indicate that the job has finished. Signed-off-by: MaĆ­ra Canal --- drivers/gpu/drm/v3d/v3d_gem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/v3d/v3d_gem.c b/drivers/gpu/drm/v3d/v3d_gem.c index afa7d170d1ff..61a7f36fc8e2 100644 --- a/drivers/gpu/drm/v3d/v3d_gem.c +++ b/drivers/gpu/drm/v3d/v3d_gem.c @@ -333,6 +333,7 @@ v3d_job_free(struct kref *ref) v3d_perfmon_put(job->perfmon); kfree(job); + job = NULL; } static void -- 2.41.0