Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp860962rwl; Fri, 24 Mar 2023 03:04:59 -0700 (PDT) X-Google-Smtp-Source: AKy350Z2T2Dx+x/QlAEdJ8Kzt7GfwQgPjq/XjNEsrkLQ6Et6VU8Q2eTpbNZfkezECnmJYjbt9q73 X-Received: by 2002:a05:6402:204c:b0:500:2cc6:36da with SMTP id bc12-20020a056402204c00b005002cc636damr2381456edb.19.1679652299433; Fri, 24 Mar 2023 03:04:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679652299; cv=none; d=google.com; s=arc-20160816; b=jVwKtnxiD99P5C6J4/9Tn5f1yisTbEl5FlCyQa0KnWb7Q829Ym+yG+esUfl9TUA6FM EWlo9HNS2vW2CG4T1hJQwDZJ/vy1YcPyaT/Vo+O5SXLsbJS3xiXOCjiwQ4iQBEfBCe9t ELlA6kTbDOZXnAAjF65uBzUP+lndfsVP1+YZb64LYtveTIR9F2yIiLh6301BIhLz1BBa gPjPIvVFb5GNYsLazuAWd/q33Ab8c9N+picEZ6wyW6N3IVPWY0inhmQx58ol+WTGsjWX 4SZfVNFA1G9Wr8vclxVfqcwsry7LTUpTp09HIsii/wfSdSXYirAAYvbt9Y3mxgHprRvw Esbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=3S1jZpPFamxYpM15q1AsKfyrzurt5PTq4wNBIuUsWUI=; b=hFgwq4/NFv7sOPXe1Uz7puqppmJpVic5Qv9o+F06mHHPHWEEK3UqdHMqK4xB5VMPYL ropdsRPgKNUnBwaC2XIw1z9Hu1/HZ51mGtzT8tIlPNW5PVBFBiK/iDpbnQH9CV59NwgB 4PQUoR7WrSzZQloKf54oanctB7p16sMEZl7Jd2KDqQvVFRcvZ6DLQHwK0ekbT1mpvgLg CvCPNT7iIJtEnI/6aK2dJVMh2T3Ymt2O2p55aUMWUcRdOwMuc7GqapjDhQGSJ4pi8/LH g9NOHUXlkJj48WxcOn3zd3zXrd5/+UIVgk8vF8ROthxCbud6KJ9CGbJMJaEeX577MiNS ZSCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=QYW+l3DB; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b23-20020aa7d497000000b005021f0d575dsi1599312edr.676.2023.03.24.03.04.34; Fri, 24 Mar 2023 03:04:59 -0700 (PDT) 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=@ffwll.ch header.s=google header.b=QYW+l3DB; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230071AbjCXJ7h (ORCPT + 99 others); Fri, 24 Mar 2023 05:59:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229938AbjCXJ7g (ORCPT ); Fri, 24 Mar 2023 05:59:36 -0400 Received: from mail-oa1-x33.google.com (mail-oa1-x33.google.com [IPv6:2001:4860:4864:20::33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 312941351E for ; Fri, 24 Mar 2023 02:59:35 -0700 (PDT) Received: by mail-oa1-x33.google.com with SMTP id 586e51a60fabf-17ebba88c60so1229532fac.3 for ; Fri, 24 Mar 2023 02:59:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; t=1679651974; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=3S1jZpPFamxYpM15q1AsKfyrzurt5PTq4wNBIuUsWUI=; b=QYW+l3DBUnQ5ubmYmXBr0H1dxlZ4HSLqh7wMlwF3ocB1NGNlLlfABYYXqOkIlu/qWx chXDwyqc0t3c6D9QdQ4Jem9Okt6b6TJ2rlECoLD11Lovfw1LHQJajCmUaHHrTx5sZM0s b076vp1OwlQK4nnvJWTh/gCUBqGaYjFE6MKG8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679651974; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3S1jZpPFamxYpM15q1AsKfyrzurt5PTq4wNBIuUsWUI=; b=Tb5wwyDVXpRNdLSgxH+7Kn2b2I76Vk8oyLK2TOtBPYj97CroH1p/jm/Vc9gYaqp5zF eDvrhYM5MwnFO8m1KDUhK0q05sO+qzcESLPyVz8szgLSaY24NDxfJ5LdnDuKehbGCszq T49G5YgrvwH+63CYnMV+FwJrtOQQAW8k/+KC/BpC+yUgiQFXNKoJkmz7q8kR9YHlvImU UgJJgPaHXdnvXshiPZOdRNT5g/KfuwpWf3r6Odx8moIByTpFm0EZ+tHo8oWjshkOJQ9h 8zlS9DC2U2KuMaMCewirduh+U9MyWUq8HySLzmUf1Fmw2ZzP5MBbK9u7h+z6px4Odq3i XDvA== X-Gm-Message-State: AAQBX9f9Fd7EQnI16HRAQiCR19xx6hn7R7xDe4TjqvgwBw5PvnpaUh1S E1MkuUc32Defcu4r4JQNKWSnrG0FZXzDgmDScZhB6Q== X-Received: by 2002:a05:6870:1050:b0:177:bf3e:5d4f with SMTP id 16-20020a056870105000b00177bf3e5d4fmr837720oaj.8.1679651974508; Fri, 24 Mar 2023 02:59:34 -0700 (PDT) MIME-Version: 1.0 References: <20230127221418.2522612-1-arnd@kernel.org> <20230308165644.GA1181835@dev-arch.thelio-3990X> <67f9fe7f-392a-9acd-1a4d-0a43da634367@nvidia.com> In-Reply-To: From: Daniel Vetter Date: Fri, 24 Mar 2023 10:59:23 +0100 Message-ID: Subject: Re: [PATCH] gpu: host1x: fix uninitialized variable use To: Jon Hunter Cc: Nathan Chancellor , Thierry Reding , David Airlie , Arnd Bergmann , Nick Desaulniers , Tom Rix , Mikko Perttunen , Christophe JAILLET , Robin Murphy , dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 24 Mar 2023 at 10:46, Daniel Vetter 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 > > > > 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 > > > > > > > > > > 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 > > > > > --- > > > > > 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 -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch