Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp843262rwl; Fri, 24 Mar 2023 02:47:46 -0700 (PDT) X-Google-Smtp-Source: AKy350YEpBLaZuz4+m7XpgrP8FWaBOblSPRywyZ8+JuZeIEWjlbLsTJxFQZ7uue+6Nw0g2Cseo/q X-Received: by 2002:a17:907:7e8e:b0:933:4647:a289 with SMTP id qb14-20020a1709077e8e00b009334647a289mr3451823ejc.48.1679651265989; Fri, 24 Mar 2023 02:47:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679651265; cv=none; d=google.com; s=arc-20160816; b=zKWs6KECpZJjPUta59Hb8fsNdbiTEc/PnYYlU+pbppKXmaP7vo79o10uM7d2FvbwT0 vX6teE+Rhdjc13aNBtCwNYfbBMSYqodwye+90mKblcJWTv0O2wUnkQqGk2nGMurSIzXV vtnumS2EF6vSyT94SyGrdGc8TRyFsSNt4lpj5l7ugP03VKg4Iffo+8giLDEHxkLxqI4h DozD2N5Fnia7NC9mFnOzPWQ090IEbdNVp+3Y0X1eqYBTZAtEkoVZeeFxv5cuiWptfizu j3rq3/bTkhQ45B4EzF43TyLFr8Di5Bm8RoRgQKLhbrGlYax+8QF0PF8YOlE30xBszRo7 /pGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date :dkim-signature; bh=gJJPNwdnhB7IEUXT0JnB6iYS0mxcFwN9Ppf5t8hZzl0=; b=qEr2RaH+j0tuAnOvKi+1YVQQD/zA+ORaLZ43B2/OfHhlFNOyQlW45/hoD9JuiUQbkB KzqW7cADBybAEtwg/NCDzqsozzFiReixSCJ10YmMGazwedf1U2L9vHKZsbP81U65ZRtf IlK1e1WbJIU3mKN0kbNaBb/vJvc2mWVvuklOuhSbToPaM+hS6MfU1gleKIRLwdtNCzZ4 rAA9SxQ7fDagOjFdDyXRQIOSWrcDJ9Ob74303FTXCDqWNJ6UzCUvlZSI1apHNBefTsGl +3ysAAs0kyegmryYhNqBxyWrHnWX99g+Ok4gWVERjE8oVQFEfXqnzJvyZeONeqdQTZKE YO5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=Qa5OozZI; 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 gu19-20020a170906f29300b009303262b4ebsi12675256ejb.993.2023.03.24.02.47.21; Fri, 24 Mar 2023 02:47:45 -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=Qa5OozZI; 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 S231434AbjCXJqg (ORCPT + 99 others); Fri, 24 Mar 2023 05:46:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231514AbjCXJqK (ORCPT ); Fri, 24 Mar 2023 05:46:10 -0400 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AA16A25952 for ; Fri, 24 Mar 2023 02:46:05 -0700 (PDT) Received: by mail-wm1-x336.google.com with SMTP id n10-20020a05600c4f8a00b003ee93d2c914so2423999wmq.2 for ; Fri, 24 Mar 2023 02:46:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; t=1679651164; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:from:to:cc :subject:date:message-id:reply-to; bh=gJJPNwdnhB7IEUXT0JnB6iYS0mxcFwN9Ppf5t8hZzl0=; b=Qa5OozZIoo53C5F+9azNMKZ21DB0vyydBQZAXgS8Chw91SQ1BJh/YnRGO1VlHf+QDW NqJGq+76prl0S1xv0UN00iYF2Bcwn9MwJ2u+hl338DaU0W7zfnh0k0xaTP+snNZR8wXB NVhLlHPLJoaHlxMr4jMkL1ELSluWeVhWBZxTM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679651164; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=gJJPNwdnhB7IEUXT0JnB6iYS0mxcFwN9Ppf5t8hZzl0=; b=jz53rrFXJwuNCMTyEb5nwq1zn/tE+AjKsIEU7r48Bfcds7oekNbANic92ray+sqYTc fbFkCThEk2A0bTNoU+KQlarLdeaW0PzPsXYDTeWYdW1qOtaWLl2BergYZMFOzCfwpc3+ hHbIVO1/w4wREqLUOM5sjEZvO/3erFVqWYCCfW1hnMTzVGhBgE7BdQmYwqbkpPdAZgQp 1tJrOB07gP2SnNmCehpH1dmBzfwgGv0WOu91wyETQAt7ZEEmgSyFZ4geZstq8jO7+Dty VmzM+TVVeIMcMGjx/WWlNCXytgPq8NWihAL9TZFCIKjcK8g5ZUBISTWHv3UNkfOsJXZN pk2A== X-Gm-Message-State: AO0yUKWjSWwo9x5SLquQvwEU6JWDF+wXX4dnl7zCWeAiVIHV2nMqqb7u NlpVOW2fCIznxb2hEKtMMj2IlQ== X-Received: by 2002:a05:600c:4fc1:b0:3ed:2a41:8529 with SMTP id o1-20020a05600c4fc100b003ed2a418529mr1438389wmq.2.1679651164092; Fri, 24 Mar 2023 02:46:04 -0700 (PDT) Received: from phenom.ffwll.local (212-51-149-33.fiber7.init7.net. [212.51.149.33]) by smtp.gmail.com with ESMTPSA id 14-20020a05600c024e00b003ed2384566fsm4369256wmj.21.2023.03.24.02.46.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Mar 2023 02:46:03 -0700 (PDT) Date: Fri, 24 Mar 2023 10:46:01 +0100 From: Daniel Vetter To: Jon Hunter Cc: Nathan Chancellor , Thierry Reding , David Airlie , Daniel Vetter , 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 Subject: Re: [PATCH] gpu: host1x: fix uninitialized variable use Message-ID: Mail-Followup-To: Jon Hunter , 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 References: <20230127221418.2522612-1-arnd@kernel.org> <20230308165644.GA1181835@dev-arch.thelio-3990X> <67f9fe7f-392a-9acd-1a4d-0a43da634367@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <67f9fe7f-392a-9acd-1a4d-0a43da634367@nvidia.com> X-Operating-System: Linux phenom 6.1.0-6-amd64 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 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 > > 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