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.129.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 24377342146 for ; Thu, 28 May 2026 19:09:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779995392; cv=none; b=TBG57tuTKftHzPIETWdZs48F/E+ggmNQWA6DpXc8BQH6YmyYhRHR1H7du5yWMSSnm/UHVyG1wx9AQ2/M1fCRmYJEOajf9uXnAqHQbYO1Z3YhaLh4QOcEmw/CdreiHjlHFzG79VrSiwCsZLpXmV/54cpjdSjJPKyPS/d3y7BhKn0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779995392; c=relaxed/simple; bh=fakoTULzpL8x2UFOvAiDOqwXfj/NdneAEJE6VOYhXQw=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=FPuoh0fi+X8EnmFn1iwigwypZ5oeJEkH4E/WpahQSxvrJlxEMIDGvCxUwwkrcRgLHhAKfLE2edYO8TuYUkM9/wtL5zJ8FRLcwJMBmgVefEfDCpxly6c6Ig7/ktIfqNJSIEoOcTMHjFcl4jC4paMDvDnfGH4ZD78nYi/RZJ4gKtA= 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=Gr0VmHMb; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=XOdU1H35; arc=none smtp.client-ip=170.10.129.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="Gr0VmHMb"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="XOdU1H35" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1779995390; 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=fakoTULzpL8x2UFOvAiDOqwXfj/NdneAEJE6VOYhXQw=; b=Gr0VmHMbEaBeKMX9tECWmqe1o/TVn+GF6E6MHVzsFz2lKUsqOOpaS1QlINauoWBLYJFcwm CXCWPp3PuQg6rw+c5iy3Ln/HhFOvTu6ejkQDavfeBM8wMU/vthtUrK89dj1EN4D0g3aRtx mktcZV90SArtmX/mYtdjxVfd1CxFO8U= Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-425-Yq5cPFXoOwGjy0NE-nbXdQ-1; Thu, 28 May 2026 15:09:48 -0400 X-MC-Unique: Yq5cPFXoOwGjy0NE-nbXdQ-1 X-Mimecast-MFC-AGG-ID: Yq5cPFXoOwGjy0NE-nbXdQ_1779995387 Received: by mail-qv1-f70.google.com with SMTP id 6a1803df08f44-8cce0957698so5002166d6.3 for ; Thu, 28 May 2026 12:09:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1779995387; x=1780600187; 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=fakoTULzpL8x2UFOvAiDOqwXfj/NdneAEJE6VOYhXQw=; b=XOdU1H35R8+UgTXa5rd07P9q0gPRHo/T4EfBia58nu0cZJu2mItwlzfDLs3OG4e1uG HNKIRypxutfLcT33Uy550lyT94ue88EFIAq/HI/8/YkOZsWYDn5OkD6xj844cpbCuNap 70kpOiry95SvKEVPjQX4u0RDXFRUIi4lfd2xzZ3IzM+b92N8eDzH2R3G7JZLOu4sdtTQ 9b3C7x28AccnIG3Eaf7OrfgyMf/zfbKuuEk87iavk5oPqU/bUzKE+45Sb8dueF3uj5NN /kJ5uemUCFV4BToT2nwNodolemU5Sk3MKT2YiRjkwjtYXNG6ti9Rf4D5WJCBYECbn/p6 55JA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779995387; x=1780600187; 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=fakoTULzpL8x2UFOvAiDOqwXfj/NdneAEJE6VOYhXQw=; b=V5aQdlzj2BMdXwlRV4fdaijpxEhhDud4i4pWBvM/ExXH2iyPotbogO2wF0I0GzlKCf jl0tCTJTGbq7BEm9QxY6YI54w3AbKOGLezN+mXqE1E670oVtmoscJrQO+A44Aiw2WZBe g42SGB7x7MeK5vJX8CYKdnLnNxxzlm1mbDSJ057O/tz1ifU33bq0YCP7glnxoYlLNQn6 wKGoYdFedN8Xrm6fQhybVd8xy1IGiEk1j6mN4ZLbMcgdOqIJSIULKYZw0DJJVc0GQbg4 bLmLRBixstBsvNVR0InVdMzqhscwf0gRbLR8OGZm86A0F+uv/+LubYCFZL19FjcmXT+L PmNw== X-Gm-Message-State: AOJu0YzHbXsrwQzpPfxFsas+lMBV3cUwO9k2dt2qHPcX5QjFqZRKrrx8 01DRTNfzW6A0S+jPUS19Cyb1w1cLoUkQs1SSWtpLM/DwKCdICHwJovDGOCqGPAVWzOxrewU1+SD 91NEfOBZQIWxosp8Yfj/wuqj8CUm54zX92kY2vagqLSzxUSmlwGSaS8T2YM8Gg8QdNQ== X-Gm-Gg: Acq92OFRs+E8y2bQ64N+BY43LtoeGNCwLZ1zfnmcLd1Xy0l+2oL5rYJje/a74wmZrGh WzkuVlrDb7M9pP5FBgZSzt7RMHjd4Xp2SJ4sD+rESLta59iae5Gq8V7nAW4Kf03yJb3iw9K70jW rhDPOUXMS/ujeO2RlygdbNshWzet8wNKWEm1WoEW7/KlTSd7RA+SwOC09ecBxKkvHZXT7x4KOFI MwqeiWajDAcOqPsfeyBup+53HS7hAJLDWnkx634M+/UfTvxAydScvhQwuGqI+HIOqG51fkYe2hY wDq8S/o1V0/HolmNCZ2iRsmUyLgTLwkP+FpMWWWo8n9QLOcimqLiHOzyIw1N1oBlTS6p6awusct L8dp2r3G6v18UL9euEtp2mFk7U4G8 X-Received: by 2002:a05:6214:252d:b0:8cc:1010:bbcb with SMTP id 6a1803df08f44-8cce216ca21mr7628926d6.27.1779995387384; Thu, 28 May 2026 12:09:47 -0700 (PDT) X-Received: by 2002:a05:6214:252d:b0:8cc:1010:bbcb with SMTP id 6a1803df08f44-8cce216ca21mr7628396d6.27.1779995386957; Thu, 28 May 2026 12:09:46 -0700 (PDT) Received: from [192.168.8.4] ([100.0.180.93]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-8cc812e2018sm211434596d6.28.2026.05.28.12.09.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 May 2026 12:09:46 -0700 (PDT) Message-ID: Subject: Re: [PATCH 0/5] nouveau/gsp: Cleanup IS_ERR_OR_NULL() usage From: lyude@redhat.com To: Timur Tabi , "dakr@kernel.org" Cc: "linux-kernel@vger.kernel.org" , "airlied@redhat.com" , "simona@ffwll.ch" , "tzimmermann@suse.de" , "dri-devel@lists.freedesktop.org" , "airlied@gmail.com" , "nouveau@lists.freedesktop.org" , "maarten.lankhorst@linux.intel.com" , "zenghongling@kylinos.cn" , "bskeggs@nvidia.com" , "mripard@kernel.org" , "zhongling0719@126.com" Date: Thu, 28 May 2026 15:09:45 -0400 In-Reply-To: References: <20260528062451.54107-1-zenghongling@kylinos.cn> <794dbd35fd81f03478cdd3238d3d506d0d800187.camel@redhat.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:06 +0000, Timur Tabi wrote: > On Thu, 2026-05-28 at 19:56 +0200, Danilo Krummrich wrote: > > I think at least this patch has to be reverted, it causes the > > following oops > > probing nouveau on my machine. > >=20 > > I can't currently look into this, but I think Sashiko [1] has a > > valid point on > > this one. >=20 > I'm not a fan of this series.=C2=A0 When I saw the number of patches, I > was suspicious, because I have a > hard time believing that there were so many functions that never > returned NULL.=C2=A0 The call tree of a > lot of Nouveau code is pretty deep, and it takes quite a lot of work > to ensure that there is no > "return NULL" in any code path. >=20 > Nouveau is kinda sloppy in this regard, which is why IS_ERR_OR_NULL > is used so much.=C2=A0 It's a safety > measure. FWIW: I already sent a revert for the last patch in the series which needs a review, but I'm happy to send out a revert for the whole thing if we want. 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