Message ID | 20230127221418.2522612-1-arnd@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1070962wrn; Fri, 27 Jan 2023 14:19:08 -0800 (PST) X-Google-Smtp-Source: AK7set+wtsCFOmAKVLQbfRs87y1i60H4ZZDzL07+wy3k7LWn3nFbgNzGOMISaQIG3PPtazixshYG X-Received: by 2002:a17:906:65d4:b0:878:5bce:291e with SMTP id z20-20020a17090665d400b008785bce291emr7205196ejn.2.1674857948213; Fri, 27 Jan 2023 14:19:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674857948; cv=none; d=google.com; s=arc-20160816; b=b40pjnXsOvPPiDxZGPpE64B+//BmvnabiAOiN96uTJ1t3bJV0Qomeerz18KuJdBOx7 VkommaBeq2ezy6RgR1fIbJFK2vzxdTJjwcxzwAUbwmg3suq5GziGXB8Sp+MJUTuqcWr3 T2PQVu7X3JXCin9EjxYnK+ilp9OrKs9/5jZ8sF+bKvoKaQ57Xw0di1dIRzKGUTjLO+8r fn5nDPi7RH2DKOaXcxY01mPC2VaDnUBrILR5yy43+el8n1mJS6j0i+dW0n3OJtd9zgme tMzIWJuAzYldi3lqve5w0K6iTcCl9wH/Cx8pV71sZSchQaN+hg0DyXhRABTdRg08/2AO jKNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=DFQJ9E+I2ByHbVOtxjILVxPPpKj18QrKnVChfOdyMm0=; b=0sH8nCIniM1ZDv+W5bpfvPIx8TaJfwzoPcN2Mk+LG+qWJB+tR2/XBuVYQTP9igah8+ QwtmoxvKFu/+nhWonk7VxPENzlJYE+UaFjTEGHay5eAAJqVq14FyARCT/O6dwSYCsfHG CIuI8sqLiQySEeSRy9jTza6Xf3ys5bz/AsCIiE4hBf0pyY49zJpJHSDf1Cmx0LLxA5kF rH+zefKQzbVGFUOaRPfA3XasasEkQ/0EmP6tWg11f2i4bPoApaCIAt+zFcE0H9mYI1Cf vSeFG6BBJRydZTwBYZJgUQi+JJPmNyqXxVDuw885jojF7BlJzSl8yLyuNBOUy6y04ka7 cozQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mLoGepRJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gk15-20020a17090790cf00b0084d3a7b6a04si5748521ejb.576.2023.01.27.14.18.41; Fri, 27 Jan 2023 14:19:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mLoGepRJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232665AbjA0WO0 (ORCPT <rfc822;lekhanya01809@gmail.com> + 99 others); Fri, 27 Jan 2023 17:14:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231439AbjA0WOY (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 27 Jan 2023 17:14:24 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08CA384942; Fri, 27 Jan 2023 14:14:24 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 933BF61DA1; Fri, 27 Jan 2023 22:14:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 024A6C433D2; Fri, 27 Jan 2023 22:14:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674857663; bh=o/wZZ1uzmJ7qFEw1pt+mcU/ptJZ13hgGGF/CULyoMJ4=; h=From:To:Cc:Subject:Date:From; b=mLoGepRJuyf4fEgFO26waiEfOSuAf6TdWVpNp3P2k9Gc2tm2E3uR46Xo/hjAvRSet 3/zhelAgl+1nCivDb+TKA7OZqmbagmtWbCHwESGfWG3n6+6mPt3Y41FkJzxMH/y4i6 7R5cvH3+cCuaZFsIzs9zYOaayHTfpDbb3GGIAmlyJNQ4Nu3GmPEnSL1vSMF3yZt5Ca PFtEYg4t2SqqTqfrm/8ZNtyys6xN4qqm3mQZN6v75bG26CdYnVl2TeLfkTZjvXrvJc giocRsVf3XzUHNtQbHmKuK8DvM1Ek1/x5K0wyYtasolTEg7/2qB6aGjQp00vFKNL5Y zt+Sp8L7RVdGg== From: Arnd Bergmann <arnd@kernel.org> To: Thierry Reding <thierry.reding@gmail.com>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch> Cc: Arnd Bergmann <arnd@arndb.de>, Nathan Chancellor <nathan@kernel.org>, Nick Desaulniers <ndesaulniers@google.com>, Tom Rix <trix@redhat.com>, Mikko Perttunen <mperttunen@nvidia.com>, Christophe JAILLET <christophe.jaillet@wanadoo.fr>, Robin Murphy <robin.murphy@arm.com>, dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH] gpu: host1x: fix uninitialized variable use Date: Fri, 27 Jan 2023 23:14:00 +0100 Message-Id: <20230127221418.2522612-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756215848386347851?= X-GMAIL-MSGID: =?utf-8?q?1756215848386347851?= |
Series |
gpu: host1x: fix uninitialized variable use
|
|
Commit Message
Arnd Bergmann
Jan. 27, 2023, 10:14 p.m. UTC
From: Arnd Bergmann <arnd@arndb.de> The error handling for platform_get_irq() failing no longer works after a recent change, clang now points this out with a warning: drivers/gpu/host1x/dev.c:520:6: error: variable 'syncpt_irq' is uninitialized when used here [-Werror,-Wuninitialized] if (syncpt_irq < 0) ^~~~~~~~~~ Fix this by removing the variable and checking the correct error status. Fixes: 625d4ffb438c ("gpu: host1x: Rewrite syncpoint interrupt handling") Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- drivers/gpu/host1x/dev.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
Comments
On Fri, Jan 27, 2023 at 11:14:00PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann <arnd@arndb.de> > > The error handling for platform_get_irq() failing no longer > works after a recent change, clang now points this out with > a warning: > > drivers/gpu/host1x/dev.c:520:6: error: variable 'syncpt_irq' is uninitialized when used here [-Werror,-Wuninitialized] > if (syncpt_irq < 0) > ^~~~~~~~~~ > > Fix this by removing the variable and checking the correct > error status. > > Fixes: 625d4ffb438c ("gpu: host1x: Rewrite syncpoint interrupt handling") > Signed-off-by: Arnd Bergmann <arnd@arndb.de> I had the same diff pending but civic duty called today :) Reviewed-by: Nathan Chancellor <nathan@kernel.org> > --- > drivers/gpu/host1x/dev.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c > index 4872d183d860..aae2efeef503 100644 > --- a/drivers/gpu/host1x/dev.c > +++ b/drivers/gpu/host1x/dev.c > @@ -487,7 +487,6 @@ static int host1x_get_resets(struct host1x *host) > static int host1x_probe(struct platform_device *pdev) > { > struct host1x *host; > - int syncpt_irq; > int err; > > host = devm_kzalloc(&pdev->dev, sizeof(*host), GFP_KERNEL); > @@ -517,8 +516,8 @@ static int host1x_probe(struct platform_device *pdev) > } > > host->syncpt_irq = platform_get_irq(pdev, 0); > - if (syncpt_irq < 0) > - return syncpt_irq; > + if (host->syncpt_irq < 0) > + return host->syncpt_irq; > > mutex_init(&host->devices_lock); > INIT_LIST_HEAD(&host->devices); > -- > 2.39.0 >
On 1/28/23 01:18, Nathan Chancellor wrote: > On Fri, Jan 27, 2023 at 11:14:00PM +0100, Arnd Bergmann wrote: >> From: Arnd Bergmann <arnd@arndb.de> >> >> The error handling for platform_get_irq() failing no longer >> works after a recent change, clang now points this out with >> a warning: >> >> drivers/gpu/host1x/dev.c:520:6: error: variable 'syncpt_irq' is uninitialized when used here [-Werror,-Wuninitialized] >> if (syncpt_irq < 0) >> ^~~~~~~~~~ >> >> Fix this by removing the variable and checking the correct >> error status. >> >> Fixes: 625d4ffb438c ("gpu: host1x: Rewrite syncpoint interrupt handling") >> Signed-off-by: Arnd Bergmann <arnd@arndb.de> > > I had the same diff pending but civic duty called today :) > > Reviewed-by: Nathan Chancellor <nathan@kernel.org> > >> --- >> drivers/gpu/host1x/dev.c | 5 ++--- >> 1 file changed, 2 insertions(+), 3 deletions(-) >> >> diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c >> index 4872d183d860..aae2efeef503 100644 >> --- a/drivers/gpu/host1x/dev.c >> +++ b/drivers/gpu/host1x/dev.c >> @@ -487,7 +487,6 @@ static int host1x_get_resets(struct host1x *host) >> static int host1x_probe(struct platform_device *pdev) >> { >> struct host1x *host; >> - int syncpt_irq; >> int err; >> >> host = devm_kzalloc(&pdev->dev, sizeof(*host), GFP_KERNEL); >> @@ -517,8 +516,8 @@ static int host1x_probe(struct platform_device *pdev) >> } >> >> host->syncpt_irq = platform_get_irq(pdev, 0); >> - if (syncpt_irq < 0) >> - return syncpt_irq; >> + if (host->syncpt_irq < 0) >> + return host->syncpt_irq; >> >> mutex_init(&host->devices_lock); >> INIT_LIST_HEAD(&host->devices); >> -- >> 2.39.0 >> Thanks both for the fix :) FWIW, Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
On Fri, Jan 27, 2023 at 11:14:00PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann <arnd@arndb.de> > > The error handling for platform_get_irq() failing no longer > works after a recent change, clang now points this out with > a warning: > > drivers/gpu/host1x/dev.c:520:6: error: variable 'syncpt_irq' is uninitialized when used here [-Werror,-Wuninitialized] > if (syncpt_irq < 0) > ^~~~~~~~~~ > > Fix this by removing the variable and checking the correct > error status. > > Fixes: 625d4ffb438c ("gpu: host1x: Rewrite syncpoint interrupt handling") > Signed-off-by: Arnd Bergmann <arnd@arndb.de> Thanks Arnd, I saw some reports from kernelci about this, too. https://lore.kernel.org/linux-next/?q=warning%3A+variable+%27syncpt_irq%27+is+uninitialized+when+used+here Reported-by: "kernelci.org bot" <bot@kernelci.org> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> > --- > drivers/gpu/host1x/dev.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c > index 4872d183d860..aae2efeef503 100644 > --- a/drivers/gpu/host1x/dev.c > +++ b/drivers/gpu/host1x/dev.c > @@ -487,7 +487,6 @@ static int host1x_get_resets(struct host1x *host) > static int host1x_probe(struct platform_device *pdev) > { > struct host1x *host; > - int syncpt_irq; > int err; > > host = devm_kzalloc(&pdev->dev, sizeof(*host), GFP_KERNEL); > @@ -517,8 +516,8 @@ static int host1x_probe(struct platform_device *pdev) > } > > host->syncpt_irq = platform_get_irq(pdev, 0); > - if (syncpt_irq < 0) > - return syncpt_irq; > + if (host->syncpt_irq < 0) > + return host->syncpt_irq; > > mutex_init(&host->devices_lock); > INIT_LIST_HEAD(&host->devices); > -- > 2.39.0 > >
Hi Thierry, Daniel, and David, On Fri, Jan 27, 2023 at 11:14:00PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann <arnd@arndb.de> > > The error handling for platform_get_irq() failing no longer > works after a recent change, clang now points this out with > a warning: > > drivers/gpu/host1x/dev.c:520:6: error: variable 'syncpt_irq' is uninitialized when used here [-Werror,-Wuninitialized] > if (syncpt_irq < 0) > ^~~~~~~~~~ > > Fix this by removing the variable and checking the correct > error status. > > Fixes: 625d4ffb438c ("gpu: host1x: Rewrite syncpoint interrupt handling") > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > --- > drivers/gpu/host1x/dev.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c > index 4872d183d860..aae2efeef503 100644 > --- a/drivers/gpu/host1x/dev.c > +++ b/drivers/gpu/host1x/dev.c > @@ -487,7 +487,6 @@ static int host1x_get_resets(struct host1x *host) > static int host1x_probe(struct platform_device *pdev) > { > struct host1x *host; > - int syncpt_irq; > int err; > > host = devm_kzalloc(&pdev->dev, sizeof(*host), GFP_KERNEL); > @@ -517,8 +516,8 @@ static int host1x_probe(struct platform_device *pdev) > } > > host->syncpt_irq = platform_get_irq(pdev, 0); > - if (syncpt_irq < 0) > - return syncpt_irq; > + if (host->syncpt_irq < 0) > + return host->syncpt_irq; > > mutex_init(&host->devices_lock); > INIT_LIST_HEAD(&host->devices); > -- > 2.39.0 > Apologies if this has been reported already or has a solution in progress but mainline is now broken because this change got separated from the change it is fixing: https://github.com/ClangBuiltLinux/continuous-integration2/actions/runs/4249931209/jobs/7391912774 https://storage.tuxsuite.com/public/clangbuiltlinux/continuous-integration2/builds/2M7y9HpiXB13qiC2mkHMyeZOcLW/build.log I see this change sitting in the drm-tegra tree [1], which is getting merged into -next, so it is fixed there, which is why we did not notice any issues until the drm-next tree was merged into mainline. Can this be fast tracked to Linus to unbreak clang builds with -Werror? [1]: https://gitlab.freedesktop.org/drm/tegra/-/commit/b9930311641cf2ed905a84aabe27e8f3868aee4a Cheers, Nathan
Ping? This warning is now in 6.3-rc1. On Thu, Feb 23, 2023 at 09:28:28AM -0700, Nathan Chancellor wrote: > Hi Thierry, Daniel, and David, > > On Fri, Jan 27, 2023 at 11:14:00PM +0100, Arnd Bergmann wrote: > > From: Arnd Bergmann <arnd@arndb.de> > > > > The error handling for platform_get_irq() failing no longer > > works after a recent change, clang now points this out with > > a warning: > > > > drivers/gpu/host1x/dev.c:520:6: error: variable 'syncpt_irq' is uninitialized when used here [-Werror,-Wuninitialized] > > if (syncpt_irq < 0) > > ^~~~~~~~~~ > > > > Fix this by removing the variable and checking the correct > > error status. > > > > Fixes: 625d4ffb438c ("gpu: host1x: Rewrite syncpoint interrupt handling") > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > > --- > > drivers/gpu/host1x/dev.c | 5 ++--- > > 1 file changed, 2 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c > > index 4872d183d860..aae2efeef503 100644 > > --- a/drivers/gpu/host1x/dev.c > > +++ b/drivers/gpu/host1x/dev.c > > @@ -487,7 +487,6 @@ static int host1x_get_resets(struct host1x *host) > > static int host1x_probe(struct platform_device *pdev) > > { > > struct host1x *host; > > - int syncpt_irq; > > int err; > > > > host = devm_kzalloc(&pdev->dev, sizeof(*host), GFP_KERNEL); > > @@ -517,8 +516,8 @@ static int host1x_probe(struct platform_device *pdev) > > } > > > > host->syncpt_irq = platform_get_irq(pdev, 0); > > - if (syncpt_irq < 0) > > - return syncpt_irq; > > + if (host->syncpt_irq < 0) > > + return host->syncpt_irq; > > > > mutex_init(&host->devices_lock); > > INIT_LIST_HEAD(&host->devices); > > -- > > 2.39.0 > > > > Apologies if this has been reported already or has a solution in > progress but mainline is now broken because this change got separated > from the change it is fixing: > > https://github.com/ClangBuiltLinux/continuous-integration2/actions/runs/4249931209/jobs/7391912774 > https://storage.tuxsuite.com/public/clangbuiltlinux/continuous-integration2/builds/2M7y9HpiXB13qiC2mkHMyeZOcLW/build.log > > I see this change sitting in the drm-tegra tree [1], which is getting > merged into -next, so it is fixed there, which is why we did not notice > any issues until the drm-next tree was merged into mainline. Can this be > fast tracked to Linus to unbreak clang builds with -Werror? > > [1]: https://gitlab.freedesktop.org/drm/tegra/-/commit/b9930311641cf2ed905a84aabe27e8f3868aee4a
On 08/03/2023 16:56, Nathan Chancellor wrote: > Ping? This warning is now in 6.3-rc1. Thierry is away at the moment. David, Daniel, do you want to pick this up directly in the meantime as a fix for 6.3? Mikko has already reviewed and FWIW ... Reviewed-by: Jon Hunter <jonathanh@nvidia.com> Thanks Jon > On Thu, Feb 23, 2023 at 09:28:28AM -0700, Nathan Chancellor wrote: >> Hi Thierry, Daniel, and David, >> >> On Fri, Jan 27, 2023 at 11:14:00PM +0100, Arnd Bergmann wrote: >>> From: Arnd Bergmann <arnd@arndb.de> >>> >>> The error handling for platform_get_irq() failing no longer >>> works after a recent change, clang now points this out with >>> a warning: >>> >>> drivers/gpu/host1x/dev.c:520:6: error: variable 'syncpt_irq' is uninitialized when used here [-Werror,-Wuninitialized] >>> if (syncpt_irq < 0) >>> ^~~~~~~~~~ >>> >>> Fix this by removing the variable and checking the correct >>> error status. >>> >>> Fixes: 625d4ffb438c ("gpu: host1x: Rewrite syncpoint interrupt handling") >>> Signed-off-by: Arnd Bergmann <arnd@arndb.de> >>> --- >>> drivers/gpu/host1x/dev.c | 5 ++--- >>> 1 file changed, 2 insertions(+), 3 deletions(-) >>> >>> diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c >>> index 4872d183d860..aae2efeef503 100644 >>> --- a/drivers/gpu/host1x/dev.c >>> +++ b/drivers/gpu/host1x/dev.c >>> @@ -487,7 +487,6 @@ static int host1x_get_resets(struct host1x *host) >>> static int host1x_probe(struct platform_device *pdev) >>> { >>> struct host1x *host; >>> - int syncpt_irq; >>> int err; >>> >>> host = devm_kzalloc(&pdev->dev, sizeof(*host), GFP_KERNEL); >>> @@ -517,8 +516,8 @@ static int host1x_probe(struct platform_device *pdev) >>> } >>> >>> host->syncpt_irq = platform_get_irq(pdev, 0); >>> - if (syncpt_irq < 0) >>> - return syncpt_irq; >>> + if (host->syncpt_irq < 0) >>> + return host->syncpt_irq; >>> >>> mutex_init(&host->devices_lock); >>> INIT_LIST_HEAD(&host->devices); >>> -- >>> 2.39.0 >>> >> >> Apologies if this has been reported already or has a solution in >> progress but mainline is now broken because this change got separated >> from the change it is fixing: >> >> https://github.com/ClangBuiltLinux/continuous-integration2/actions/runs/4249931209/jobs/7391912774 >> https://storage.tuxsuite.com/public/clangbuiltlinux/continuous-integration2/builds/2M7y9HpiXB13qiC2mkHMyeZOcLW/build.log >> >> I see this change sitting in the drm-tegra tree [1], which is getting >> merged into -next, so it is fixed there, which is why we did not notice >> any issues until the drm-next tree was merged into mainline. Can this be >> fast tracked to Linus to unbreak clang builds with -Werror? >> >> [1]: https://gitlab.freedesktop.org/drm/tegra/-/commit/b9930311641cf2ed905a84aabe27e8f3868aee4a
On Wed, Mar 08, 2023 at 05:28:06PM +0000, Jon Hunter wrote: > > > On 08/03/2023 16:56, Nathan Chancellor wrote: > > Ping? This warning is now in 6.3-rc1. > > Thierry is away at the moment. > > David, Daniel, do you want to pick this up directly in the meantime as a fix > for 6.3? Mikko has already reviewed and FWIW ... Generally first fallback should be drm-misc maintainers (or anyone else with commit rights), but since this fell through cracks for weeks it seems I'll pick it up to drm-fixes now directly. -Daniel > > Reviewed-by: Jon Hunter <jonathanh@nvidia.com> > > Thanks > Jon > > > > On Thu, Feb 23, 2023 at 09:28:28AM -0700, Nathan Chancellor wrote: > > > Hi Thierry, Daniel, and David, > > > > > > On Fri, Jan 27, 2023 at 11:14:00PM +0100, Arnd Bergmann wrote: > > > > From: Arnd Bergmann <arnd@arndb.de> > > > > > > > > The error handling for platform_get_irq() failing no longer > > > > works after a recent change, clang now points this out with > > > > a warning: > > > > > > > > drivers/gpu/host1x/dev.c:520:6: error: variable 'syncpt_irq' is uninitialized when used here [-Werror,-Wuninitialized] > > > > if (syncpt_irq < 0) > > > > ^~~~~~~~~~ > > > > > > > > Fix this by removing the variable and checking the correct > > > > error status. > > > > > > > > Fixes: 625d4ffb438c ("gpu: host1x: Rewrite syncpoint interrupt handling") > > > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > > > > --- > > > > drivers/gpu/host1x/dev.c | 5 ++--- > > > > 1 file changed, 2 insertions(+), 3 deletions(-) > > > > > > > > diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c > > > > index 4872d183d860..aae2efeef503 100644 > > > > --- a/drivers/gpu/host1x/dev.c > > > > +++ b/drivers/gpu/host1x/dev.c > > > > @@ -487,7 +487,6 @@ static int host1x_get_resets(struct host1x *host) > > > > static int host1x_probe(struct platform_device *pdev) > > > > { > > > > struct host1x *host; > > > > - int syncpt_irq; > > > > int err; > > > > host = devm_kzalloc(&pdev->dev, sizeof(*host), GFP_KERNEL); > > > > @@ -517,8 +516,8 @@ static int host1x_probe(struct platform_device *pdev) > > > > } > > > > host->syncpt_irq = platform_get_irq(pdev, 0); > > > > - if (syncpt_irq < 0) > > > > - return syncpt_irq; > > > > + if (host->syncpt_irq < 0) > > > > + return host->syncpt_irq; > > > > mutex_init(&host->devices_lock); > > > > INIT_LIST_HEAD(&host->devices); > > > > -- > > > > 2.39.0 > > > > > > > > > > Apologies if this has been reported already or has a solution in > > > progress but mainline is now broken because this change got separated > > > from the change it is fixing: > > > > > > https://github.com/ClangBuiltLinux/continuous-integration2/actions/runs/4249931209/jobs/7391912774 > > > https://storage.tuxsuite.com/public/clangbuiltlinux/continuous-integration2/builds/2M7y9HpiXB13qiC2mkHMyeZOcLW/build.log > > > > > > I see this change sitting in the drm-tegra tree [1], which is getting > > > merged into -next, so it is fixed there, which is why we did not notice > > > any issues until the drm-next tree was merged into mainline. Can this be > > > fast tracked to Linus to unbreak clang builds with -Werror? > > > > > > [1]: https://gitlab.freedesktop.org/drm/tegra/-/commit/b9930311641cf2ed905a84aabe27e8f3868aee4a > > -- > nvpublic
On Fri, 24 Mar 2023 at 10:46, Daniel Vetter <daniel@ffwll.ch> wrote: > > On Wed, Mar 08, 2023 at 05:28:06PM +0000, Jon Hunter wrote: > > > > > > On 08/03/2023 16:56, Nathan Chancellor wrote: > > > Ping? This warning is now in 6.3-rc1. > > > > Thierry is away at the moment. > > > > David, Daniel, do you want to pick this up directly in the meantime as a fix > > for 6.3? Mikko has already reviewed and FWIW ... > > Generally first fallback should be drm-misc maintainers (or anyone else > with commit rights), but since this fell through cracks for weeks it seems > I'll pick it up to drm-fixes now directly. Ok I think I found out why this fell through cracks, MAINTAINERS isn't updated that host1x&tegra is maintained in drm-misc. John, since Thierry is out, can you pls create the MAINTAINERS patch to - point at drm-misc git repo everywhere needed - add any missing host1x paths to the drm-misc entry so that get_maintainers.pl adds the right people for this patch (currently it doesn't) Also should we have at least a 2nd person for tegra stuff (or well maybe nvidia stuff in general) for drm-misc? Currently it's just Thierry, and I don't think that's enough. Whomever gets volunteered please follow https://drm.pages.freedesktop.org/maintainer-tools/commit-access.html#drm-misc Thanks, Daniel > > > > > Reviewed-by: Jon Hunter <jonathanh@nvidia.com> > > > > Thanks > > Jon > > > > > > > On Thu, Feb 23, 2023 at 09:28:28AM -0700, Nathan Chancellor wrote: > > > > Hi Thierry, Daniel, and David, > > > > > > > > On Fri, Jan 27, 2023 at 11:14:00PM +0100, Arnd Bergmann wrote: > > > > > From: Arnd Bergmann <arnd@arndb.de> > > > > > > > > > > The error handling for platform_get_irq() failing no longer > > > > > works after a recent change, clang now points this out with > > > > > a warning: > > > > > > > > > > drivers/gpu/host1x/dev.c:520:6: error: variable 'syncpt_irq' is uninitialized when used here [-Werror,-Wuninitialized] > > > > > if (syncpt_irq < 0) > > > > > ^~~~~~~~~~ > > > > > > > > > > Fix this by removing the variable and checking the correct > > > > > error status. > > > > > > > > > > Fixes: 625d4ffb438c ("gpu: host1x: Rewrite syncpoint interrupt handling") > > > > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > > > > > --- > > > > > drivers/gpu/host1x/dev.c | 5 ++--- > > > > > 1 file changed, 2 insertions(+), 3 deletions(-) > > > > > > > > > > diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c > > > > > index 4872d183d860..aae2efeef503 100644 > > > > > --- a/drivers/gpu/host1x/dev.c > > > > > +++ b/drivers/gpu/host1x/dev.c > > > > > @@ -487,7 +487,6 @@ static int host1x_get_resets(struct host1x *host) > > > > > static int host1x_probe(struct platform_device *pdev) > > > > > { > > > > > struct host1x *host; > > > > > - int syncpt_irq; > > > > > int err; > > > > > host = devm_kzalloc(&pdev->dev, sizeof(*host), GFP_KERNEL); > > > > > @@ -517,8 +516,8 @@ static int host1x_probe(struct platform_device *pdev) > > > > > } > > > > > host->syncpt_irq = platform_get_irq(pdev, 0); > > > > > - if (syncpt_irq < 0) > > > > > - return syncpt_irq; > > > > > + if (host->syncpt_irq < 0) > > > > > + return host->syncpt_irq; > > > > > mutex_init(&host->devices_lock); > > > > > INIT_LIST_HEAD(&host->devices); > > > > > -- > > > > > 2.39.0 > > > > > > > > > > > > > Apologies if this has been reported already or has a solution in > > > > progress but mainline is now broken because this change got separated > > > > from the change it is fixing: > > > > > > > > https://github.com/ClangBuiltLinux/continuous-integration2/actions/runs/4249931209/jobs/7391912774 > > > > https://storage.tuxsuite.com/public/clangbuiltlinux/continuous-integration2/builds/2M7y9HpiXB13qiC2mkHMyeZOcLW/build.log > > > > > > > > I see this change sitting in the drm-tegra tree [1], which is getting > > > > merged into -next, so it is fixed there, which is why we did not notice > > > > any issues until the drm-next tree was merged into mainline. Can this be > > > > fast tracked to Linus to unbreak clang builds with -Werror? > > > > > > > > [1]: https://gitlab.freedesktop.org/drm/tegra/-/commit/b9930311641cf2ed905a84aabe27e8f3868aee4a > > > > -- > > nvpublic > > -- > Daniel Vetter > Software Engineer, Intel Corporation > http://blog.ffwll.ch
On Fri, Mar 24, 2023 at 10:59:23AM +0100, Daniel Vetter wrote: > On Fri, 24 Mar 2023 at 10:46, Daniel Vetter <daniel@ffwll.ch> wrote: > > > > On Wed, Mar 08, 2023 at 05:28:06PM +0000, Jon Hunter wrote: > > > > > > > > > On 08/03/2023 16:56, Nathan Chancellor wrote: > > > > Ping? This warning is now in 6.3-rc1. > > > > > > Thierry is away at the moment. > > > > > > David, Daniel, do you want to pick this up directly in the meantime as a fix > > > for 6.3? Mikko has already reviewed and FWIW ... > > > > Generally first fallback should be drm-misc maintainers (or anyone else > > with commit rights), but since this fell through cracks for weeks it seems > > I'll pick it up to drm-fixes now directly. > > Ok I think I found out why this fell through cracks, MAINTAINERS isn't > updated that host1x&tegra is maintained in drm-misc. > > John, since Thierry is out, can you pls create the MAINTAINERS patch to > - point at drm-misc git repo everywhere needed > - add any missing host1x paths to the drm-misc entry so that > get_maintainers.pl adds the right people for this patch (currently it > doesn't) > > Also should we have at least a 2nd person for tegra stuff (or well > maybe nvidia stuff in general) for drm-misc? Currently it's just > Thierry, and I don't think that's enough. Whomever gets volunteered > please follow > > https://drm.pages.freedesktop.org/maintainer-tools/commit-access.html#drm-misc We never actually moved host1x and Tegra DRM to drm-misc completely. There's still a separate tree that feeds into linux-next. This made sense a while ago because there was a lot going on, but development speed has decreased recently, so we may want to fix that. The big benefit is that drm-misc is better oiled than drm-tegra, so getting things merged would be easier for everyone. I'm all in favor of adding a second Tegra person to take pick up the slack when necessary. Thierry
On Fri, 24 Mar 2023 at 11:38, Thierry Reding <thierry.reding@gmail.com> wrote: > > On Fri, Mar 24, 2023 at 10:59:23AM +0100, Daniel Vetter wrote: > > On Fri, 24 Mar 2023 at 10:46, Daniel Vetter <daniel@ffwll.ch> wrote: > > > > > > On Wed, Mar 08, 2023 at 05:28:06PM +0000, Jon Hunter wrote: > > > > > > > > > > > > On 08/03/2023 16:56, Nathan Chancellor wrote: > > > > > Ping? This warning is now in 6.3-rc1. > > > > > > > > Thierry is away at the moment. > > > > > > > > David, Daniel, do you want to pick this up directly in the meantime as a fix > > > > for 6.3? Mikko has already reviewed and FWIW ... > > > > > > Generally first fallback should be drm-misc maintainers (or anyone else > > > with commit rights), but since this fell through cracks for weeks it seems > > > I'll pick it up to drm-fixes now directly. > > > > Ok I think I found out why this fell through cracks, MAINTAINERS isn't > > updated that host1x&tegra is maintained in drm-misc. > > > > John, since Thierry is out, can you pls create the MAINTAINERS patch to > > - point at drm-misc git repo everywhere needed > > - add any missing host1x paths to the drm-misc entry so that > > get_maintainers.pl adds the right people for this patch (currently it > > doesn't) > > > > Also should we have at least a 2nd person for tegra stuff (or well > > maybe nvidia stuff in general) for drm-misc? Currently it's just > > Thierry, and I don't think that's enough. Whomever gets volunteered > > please follow > > > > https://drm.pages.freedesktop.org/maintainer-tools/commit-access.html#drm-misc > > We never actually moved host1x and Tegra DRM to drm-misc completely. > There's still a separate tree that feeds into linux-next. This made > sense a while ago because there was a lot going on, but development > speed has decreased recently, so we may want to fix that. The big > benefit is that drm-misc is better oiled than drm-tegra, so getting > things merged would be easier for everyone. Hm I thought you had a split where you feed -fixes through misc and features through tegra.git? Just listing both trees would cover that. > I'm all in favor of adding a second Tegra person to take pick up the > slack when necessary. Imo features still through tegra.git with just you is fine, there's not going to be anyone else (like ci farms) blocked if that's held up for a bit. It's more the bugfixes where a 2nd nvidia person would be great. -Daniel
diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c index 4872d183d860..aae2efeef503 100644 --- a/drivers/gpu/host1x/dev.c +++ b/drivers/gpu/host1x/dev.c @@ -487,7 +487,6 @@ static int host1x_get_resets(struct host1x *host) static int host1x_probe(struct platform_device *pdev) { struct host1x *host; - int syncpt_irq; int err; host = devm_kzalloc(&pdev->dev, sizeof(*host), GFP_KERNEL); @@ -517,8 +516,8 @@ static int host1x_probe(struct platform_device *pdev) } host->syncpt_irq = platform_get_irq(pdev, 0); - if (syncpt_irq < 0) - return syncpt_irq; + if (host->syncpt_irq < 0) + return host->syncpt_irq; mutex_init(&host->devices_lock); INIT_LIST_HEAD(&host->devices);