mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: lyude@redhat.com
To: Timur Tabi <ttabi@nvidia.com>, "dakr@kernel.org" <dakr@kernel.org>
Cc: "airlied@redhat.com" <airlied@redhat.com>,
	"tzimmermann@suse.de"	 <tzimmermann@suse.de>,
	"simona@ffwll.ch" <simona@ffwll.ch>,
	 "dri-devel@lists.freedesktop.org"	
	<dri-devel@lists.freedesktop.org>,
	"nouveau@lists.freedesktop.org"	 <nouveau@lists.freedesktop.org>,
	"airlied@gmail.com" <airlied@gmail.com>,
	 "maarten.lankhorst@linux.intel.com"	
	<maarten.lankhorst@linux.intel.com>,
	"zenghongling@kylinos.cn"	 <zenghongling@kylinos.cn>,
	"bskeggs@nvidia.com" <bskeggs@nvidia.com>,
	 "linux-kernel@vger.kernel.org"	 <linux-kernel@vger.kernel.org>,
	"zhongling0719@126.com" <zhongling0719@126.com>,
	 "mripard@kernel.org"	 <mripard@kernel.org>
Subject: Re: [PATCH 0/5] nouveau/gsp: Cleanup IS_ERR_OR_NULL() usage
Date: Thu, 28 May 2026 15:21:27 -0400	[thread overview]
Message-ID: <3c74f55d233e1607d2b427f758ed01b2694fb704.camel@redhat.com> (raw)
In-Reply-To: <6f1e4f968777c0e78b2bcd1c3ef2812b28a0ec41.camel@nvidia.com>

On Thu, 2026-05-28 at 19:19 +0000, Timur Tabi wrote:
> On Thu, 2026-05-28 at 15:09 -0400, lyude@redhat.com wrote:
> > You are right - I did actually sit down and try to run through all
> > of
> > the codepaths for all these functions, but there's clearly a number
> > that I missed and should have checked sashiko for.
> 
> Even if you could narrow down the list to those functions that are
> 100% okay with IS_ERR, that's not
> future proof.  I wouldn't be surprised if there are some code paths
> where IS_ERR_OR_NULL is
> required, but then the NULL is converted to an ERR, and so the top-
> level caller will see only ERR. 
> But what happens if there's a refactor or some other major code
> change?  
> 
> Like I implied earlier, the real problem is that Nouveau is
> inconsistent in how it returns failure.
> Sometimes it returns NULL, sometimes it returns ERR, sometimes it
> could be either.  So a proper fix
> is not replacing IS_ERR_OR_NULL with IS_ERR wherever we can get away
> with it today.  The proper fix
> is to revamp the entire code base to be consistent, and no one wants
> to do that work.


Yeah - that's a good point. I will go ahead and send the revert for the
whole series then, would you mind helping to review it?


  reply	other threads:[~2026-05-28 19:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-28  6:24 Hongling Zeng
2026-05-28  6:24 ` [PATCH 1/5] nouveau/gsp: cleanup IS_ERR_OR_NULL in rm_alloc functions Hongling Zeng
2026-05-28  6:24 ` [PATCH 2/5] nouveau/gsp: cleanup IS_ERR_OR_NULL in rpc_rd Hongling Zeng
2026-05-28  6:24 ` [PATCH 3/5] nouveau/gsp/rm: cleanup IS_ERR_OR_NULL in core implementation Hongling Zeng
2026-05-28  6:24 ` [PATCH 4/5] nouveau/gsp/rm: cleanup WARN_ON(IS_ERR_OR_NULL) Hongling Zeng
2026-05-28  6:24 ` [PATCH 5/5] nouveau/gsp/rm: cleanup remaining IS_ERR_OR_NULL usage Hongling Zeng
2026-05-28 16:41 ` [PATCH 0/5] nouveau/gsp: Cleanup IS_ERR_OR_NULL() usage lyude
2026-05-28 17:56   ` Danilo Krummrich
2026-05-28 18:21     ` lyude
2026-05-28 19:06     ` Timur Tabi
2026-05-28 19:09       ` lyude
2026-05-28 19:19         ` Timur Tabi
2026-05-28 19:21           ` lyude [this message]
2026-05-28 19:22             ` Timur Tabi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3c74f55d233e1607d2b427f758ed01b2694fb704.camel@redhat.com \
    --to=lyude@redhat.com \
    --cc=airlied@gmail.com \
    --cc=airlied@redhat.com \
    --cc=bskeggs@nvidia.com \
    --cc=dakr@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=nouveau@lists.freedesktop.org \
    --cc=simona@ffwll.ch \
    --cc=ttabi@nvidia.com \
    --cc=tzimmermann@suse.de \
    --cc=zenghongling@kylinos.cn \
    --cc=zhongling0719@126.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®