From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 2742F4028E6 for ; Thu, 28 May 2026 19:21:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779996094; cv=none; b=Rdi/BysXjyMuboGAkaJacPabs0SPp1pK3t0YSz7j3L9e/6vcNIOaq6pyAnmAJLeJKcV1wPAGK4thSfBZ/wuD6hZaMZ6NQItvU4QTp3iNjhvBU/QhbsfE3L9hv5FjYDobTM2zqNAGNp7Bb91mLYlPBbF4XRMuLQjwJrHu8oHwG/A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779996094; c=relaxed/simple; bh=UYcN4au38G2Xy5ZRseiMwYK5kGSwTZoITrWGoAbnKlM=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=ZYdjgH8c4hIc4pQogzzVFHNWDEQ6u50oLG8uAPRDOWSXQpI+nYkcYZFeupqqlKu2NpXy3UXRLpd8mMeMRTUNlU9RIlvIGHqJ/ALZxKsZQp1p9JUbWsGSXus7p4nCQgMfT1Kq7AFO1rzORvQnR8s72tGcjZBy3urOJiaWxfZfm/M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=V5m3izTx; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=Jh2uMEKD; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="V5m3izTx"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="Jh2uMEKD" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779996092; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UYcN4au38G2Xy5ZRseiMwYK5kGSwTZoITrWGoAbnKlM=; b=V5m3izTxAVerFRekLLMMiS10Wzwtp1UeiKf+8nTnzd4xdkE/U1Kv/R+LnIWF53xSlu3Ndf unFUFNaC2X9GLRqsfAOfUJtz51kCdrPMvdT/HZrtX69+QDw1QyRFEOvsZGp5kUgDhFk2Wz 5hkUaETnJERtSDEbq41dwKgE8rs/ODY= Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-464-eT8-lNgAP1SpLsP5oPPIUQ-1; Thu, 28 May 2026 15:21:30 -0400 X-MC-Unique: eT8-lNgAP1SpLsP5oPPIUQ-1 X-Mimecast-MFC-AGG-ID: eT8-lNgAP1SpLsP5oPPIUQ_1779996090 Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-514b673c8f1so1719521cf.3 for ; Thu, 28 May 2026 12:21:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1779996090; x=1780600890; darn=vger.kernel.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=UYcN4au38G2Xy5ZRseiMwYK5kGSwTZoITrWGoAbnKlM=; b=Jh2uMEKDt4HvfcDX37mCX8/1MQt+3tiyKZ8i+ZtxZ6AOhgnNoFRTJDtniHnCOJvx0d ll8pet+pnzgqOwFu21KJ1eqOjKmkKY3Q6vqWKB2Q+SP0fZZNtsuhckGBKBv15wuCzfOX 2HwmGNUnHehmUdfsvi/MIDBD0T90JTPLCcRkNVBhXdxg0YowKW0DjWP2mj6booQPLv1d Cs2bJos4Y9KLbGWZHKPgN9KZoLrxeRTT9aizM0pMUzp6/EYHGvq0R+nSZ87R68mxu3ym 1Jssy8466i8yIJupOVxtUsIXxFU1TV0NWZ9/LebLtKJqPpw4/DmFOd1sBoTPs5hNs38N oUUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779996090; x=1780600890; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=UYcN4au38G2Xy5ZRseiMwYK5kGSwTZoITrWGoAbnKlM=; b=oFC+X4e4BOr03z7rwC1knx3XJmEHllyvUZ8y1wLG/m11zVhfi+Qckm6DAK5ih9Rqpr TFd5yLx34RjmxuytKm2YNagzyuyO8vEaO+KJSI+bPRKx3rSP9vTf9YYjD2ZJAUIq24g3 9KXBusH7AYaE7OSolXjmZGsoGNZdbGu35MTCQ1fTO1rILtrlgGhSLMScpJj78EXMoZwn KLEZy+JbHZAqysTPgWw1oJAblyrEVH3iDbYATtOR2qbeequZ/bR1Bwf2GVLRX3CuJ32x +E7RgGOnwFgk9+IOFes14PsEapgkaWeJaslMMrw9X1yrglJxIwxu+U4kykNnox9+2gJ1 dVeQ== X-Forwarded-Encrypted: i=1; AFNElJ/SbaWvQ20EpeV11fB9D+hOEFoTGYwAWdXKy8mLVkqWPE6RtXiNrAfsHo5oS/0I0+rZVxXltzR4+wVCwvc=@vger.kernel.org X-Gm-Message-State: AOJu0Yx+7M6YUjHvHkWsXZzyUhOV68aRE2+HSloz2VRJQzjczW67naZt czHwGPv0WhZvl4h4AV24CICnOi/gVw8zMP+wRCSfESyAMyeaPQ9Vo6UCqR5y0yB1IzUP/km7VU5 SjHrYcEe4Kgbyc905uTGlNiaFgXEEMZECJBsQ6jT55gziLJ5G1adSmT0SMbjJ1q6F6w== X-Gm-Gg: Acq92OEzS3fFc+8tP0YGi1/KlS3JW0T1hIsOm8BBftPYQaeeXoQKzMUqsD+IQlxqddv mNEONcJO68VBZ4SmEmPxJyVsEIuJh+aMLzIOKZkI0FBZvLKY0xF5hCjEetHQCWDIYr/WdFhYbl3 18uz88a3dbX8B8np4eZHQwbFcs095I3S6YbauABHopdaJKzmILNFEoJeKY7Hy9F6DIvQ5xWtR31 Udco4H1JsvYPZEmKbAf//rQZEloPz7jPzFb/dCann2CNYea1mYShVL1fSupPHrDNh7ibrwQIIil qwjAQ+t/RHIAZUBk+Bg8t4a7VyXxAg2C7A5o/G8zmdH5XKIrxOoD6WfJGBt1uSPlBpOtrDooCNM nYYD72E0+U9+jWnVy1QWj0oZY7uX3 X-Received: by 2002:a05:622a:451:b0:517:282c:b894 with SMTP id d75a77b69052e-5172cdf83eemr1615711cf.53.1779996089875; Thu, 28 May 2026 12:21:29 -0700 (PDT) X-Received: by 2002:a05:622a:451:b0:517:282c:b894 with SMTP id d75a77b69052e-5172cdf83eemr1615191cf.53.1779996089434; Thu, 28 May 2026 12:21:29 -0700 (PDT) Received: from [192.168.8.4] ([100.0.180.93]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-51706b08199sm82817831cf.29.2026.05.28.12.21.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 May 2026 12:21:27 -0700 (PDT) Message-ID: <3c74f55d233e1607d2b427f758ed01b2694fb704.camel@redhat.com> Subject: Re: [PATCH 0/5] nouveau/gsp: Cleanup IS_ERR_OR_NULL() usage From: lyude@redhat.com To: Timur Tabi , "dakr@kernel.org" Cc: "airlied@redhat.com" , "tzimmermann@suse.de" , "simona@ffwll.ch" , "dri-devel@lists.freedesktop.org" , "nouveau@lists.freedesktop.org" , "airlied@gmail.com" , "maarten.lankhorst@linux.intel.com" , "zenghongling@kylinos.cn" , "bskeggs@nvidia.com" , "linux-kernel@vger.kernel.org" , "zhongling0719@126.com" , "mripard@kernel.org" Date: Thu, 28 May 2026 15:21:27 -0400 In-Reply-To: <6f1e4f968777c0e78b2bcd1c3ef2812b28a0ec41.camel@nvidia.com> References: <20260528062451.54107-1-zenghongling@kylinos.cn> <794dbd35fd81f03478cdd3238d3d506d0d800187.camel@redhat.com> <6f1e4f968777c0e78b2bcd1c3ef2812b28a0ec41.camel@nvidia.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.58.3 (3.58.3-1.fc43) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Thu, 2026-05-28 at 19:19 +0000, Timur Tabi wrote: > On Thu, 2026-05-28 at 15:09 -0400, lyude@redhat.com=C2=A0wrote: > > 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. >=20 > Even if you could narrow down the list to those functions that are > 100% okay with IS_ERR, that's not > future proof.=C2=A0 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.=20 > But what happens if there's a refactor or some other major code > change?=C2=A0=20 >=20 > 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.=C2=A0 So a proper fix > is not replacing IS_ERR_OR_NULL with IS_ERR wherever we can get away > with it today.=C2=A0 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?