From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2CF7E212542 for ; Thu, 28 May 2026 19:44:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779997498; cv=none; b=cum5Lakz9h5oJDLplsc7Vtov+1+2HFEk7QYJenAkIbtCVH/r0p31FLSuiLiYLlWjJKN7PrFNwrOPYCByqaS4yT/vnvs/6t1nWtCrs3RLRkBroyx2TOO8csB6CVmas5mxKzoCT2qxEsw4Phv3bBBmC5yzQL9Ut9ffQIXsGyTifOI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779997498; c=relaxed/simple; bh=4cig00q5nTs6r+xz+gJA2DU+F3PQQP8y09gx/mGBfl0=; h=Mime-Version:Content-Type:Date:Message-Id:From:Subject:Cc:To: References:In-Reply-To; b=toj7DmSkIuTVU3DsOM7lvnXSO+FNMk0mTamSwTVLpU3B/z/yF5036TxgA/4XOKsepKlEl1i42RhHRuX+/PzZPLn0JeXheN5LzlZ4ofgoZ2ezy1ELQH5EskFARrw1qJUSa5CSX7NVQ5mEJRjqMPyWk/xycck+G5NMX4wxGmM+LrE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=i7WgIx7u; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="i7WgIx7u" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 27CA61F000E9; Thu, 28 May 2026 19:44:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1779997496; bh=Al1Rdb0qP+tKYEA5EKgoaK4bwuBTFrZINc4pk3eqfec=; h=Date:From:Subject:Cc:To:References:In-Reply-To; b=i7WgIx7u93jihOGlS5GspsKjabCLij0u1nfESdcJQM9boPVNsHzFgmJNP29FW4scX VezJW37R8sJfQv4/YtN0rxZseENN+xhdCoMong9NuORcDhHWGVihrF7cE7eOQk46kI xzV8ftI0TI/ubVNDNBz13zAL0TgFgRz+W7D/+ogNC5Oj5yKySNsoRa47heYGKfmTLV LhAH+GPoEKq4NmQYIw94WJd3CVa3iiF0LN+JUikwmkXjeunokxTnnVNZUQUukyopeA EJ4e+MSFG5YCi3LWXHGso7ip/8C40NcxIAdVXN0XXhUJDhOvFc0PeFTdYhLMM9GGuy 6idtrbPntPJuw== Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Thu, 28 May 2026 21:44:52 +0200 Message-Id: From: "Danilo Krummrich" Subject: Re: [PATCH 0/5] Revert cleanups for IS_ERR_OR_NULL() usage Cc: , , , "Dave Airlie" , "Qianfeng Rong" , "Maarten Lankhorst" , "Kees Cook" , "Simona Vetter" , "David Airlie" , "Thomas Zimmermann" , "Maxime Ripard" , "Hongling Zeng" , "Zhi Wang" To: "Lyude Paul" , "Timur Tabi" References: <20260528192847.4077458-1-lyude@redhat.com> In-Reply-To: <20260528192847.4077458-1-lyude@redhat.com> On Thu May 28, 2026 at 9:27 PM CEST, Lyude Paul wrote: > Lyude Paul (5): > Revert "nouveau/gsp/rm: cleanup remaining IS_ERR_OR_NULL usage" > Revert "nouveau/gsp/rm: cleanup IS_ERR_OR_NULL in core implementation" > Revert "nouveau/gsp/rm: cleanup WARN_ON(IS_ERR_OR_NULL)" > Revert "nouveau/gsp: cleanup IS_ERR_OR_NULL in rpc_rd" > Revert "nouveau/gsp: cleanup IS_ERR_OR_NULL in rm_alloc functions" Reverting the whole thing for now is the right call, as it needs some more review. @Timur: I do think cleaning this up is the right call in general though, an= d I also don't think that the whole driver necessarily needs to be consistent o= n whether IS_ERR_OR_NULL() or IS_ERR() is used -- it depends on the context (although I usually prefer not to mix up NULL and ERR semantics in the firs= t place). It should however be consistent in terms of what functions can actually ret= urn. ret =3D foo(); if (IS_ERR_OR_NULL(ret)) return ret; If foo() can never return NULL, the above is misleading, as it puts an obligation on the caller to somehow handle the NULL case and come up with a= n actual error code for it. So, I think it is the right call to align that to what functions can actual= ly return, but while doing this, the contract should be properly documented, s= uch that subsequent changes can be properly validated. I can pick this up later, but in case you want to pick it up Lyude, note th= at this now has to go into drm-misc-next-fixes. Thanks, Danilo