Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2766701rdh; Wed, 27 Sep 2023 12:02:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF/YWhITrS6s6alxyGriyeF+VaGzL+eCmeYdN3yP4QAMXFeDxJr6jnZKImSbzGRr+/2tRLS X-Received: by 2002:a05:6a00:1914:b0:690:3a0f:4164 with SMTP id y20-20020a056a00191400b006903a0f4164mr3065151pfi.19.1695841352706; Wed, 27 Sep 2023 12:02:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695841352; cv=none; d=google.com; s=arc-20160816; b=mMS3EiBvD8pijQ030YkuwgWUDxznZNbRx5/2VRZM9l/AJs9d4U8tHRiZ018jXqkR1L arNuZMi/E1Hck9oxs3yUi3nZDWBF0T+bfv9DGjholVgzyUYUuFNDH7lHjw+53agmBMsm hIJszefzmstWwpxQDGXgINO46DrmN+EPxgtKOHcdIU79OKZl1tu3dXFp9LuD5i2C1d/T VNjZcfzCWTvczZ4hu1/n6VaEJeUr3aWSogUuc2ffDXI8vLki7BMvlO7IWGMalqdCS/j+ LFKqS9zd/JrF72KXEpABGzoQ0VcL2qCsnwkaMBII2xRPB0Fj6Jtyt28wvJmAcpeXd0bP Fn2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=Dmc5VmRD75N5MrwkjQkOMmpHbgV6BLNCT6oM/cgrosQ=; fh=4njCx6ahVJnPqHWh30zsquBEAvq5gVe6TjQB/b4EL5g=; b=Yg6AQQ4YzRP2jC1Pfdv0wl+O5/mAThSDdmr8SNDb05NzbdC3hN6kY6cmyNwdiQm8la y1SnA6RHeLUQ4cTecHuBvos7KcSY6QivJ02LLT40xKC+V9qu3J4RsPGr+sg+Q6u9NrUk Zjjr+frqJs5jWhtaKNh1Hm9eNVfIs4KxKgDpYvW6pCjnlVePctCu3vrqaldbeDR3V/Vk KCtdfv9w864+VUvCyxLbZu5aWJALBBieVVvGAiEtUt6+oxgiSyf7O0rJGLAHtUWtVzUf meHBock3K+yv7dV6jglNz2XukvOQJGr9gY04wfVuRZ/yRr7bvmFGCCk6Y+nIuBjPPlOm SlYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=R32qGWQ+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id s16-20020a056a00195000b0068e4c3f3ac2si17138567pfk.245.2023.09.27.12.02.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 12:02:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=R32qGWQ+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 5402F80C6EB2; Wed, 27 Sep 2023 09:08:46 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230383AbjI0QIj (ORCPT + 99 others); Wed, 27 Sep 2023 12:08:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229478AbjI0QIh (ORCPT ); Wed, 27 Sep 2023 12:08:37 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4EDC92 for ; Wed, 27 Sep 2023 09:07:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1695830874; 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=Dmc5VmRD75N5MrwkjQkOMmpHbgV6BLNCT6oM/cgrosQ=; b=R32qGWQ+husnVbwqfNjjucdSMaRYYlZoorFaJsvq4kppQFpQTVlKYdCRyafEF6QMXd7nQ0 tgy5wRlQxWhJIV9CdrSeLpOxWXM3fjYI44FNno6P7UA+WzHcwfXe3nGuA+FNqQm54jfntC ePtJ3dDoZxoBVBijEznhmgDm4teyNlQ= Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-128-P5wa97hBNeGWOUfc_sf1oQ-1; Wed, 27 Sep 2023 12:07:52 -0400 X-MC-Unique: P5wa97hBNeGWOUfc_sf1oQ-1 Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-99388334de6so1001196366b.0 for ; Wed, 27 Sep 2023 09:07:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695830871; x=1696435671; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Dmc5VmRD75N5MrwkjQkOMmpHbgV6BLNCT6oM/cgrosQ=; b=EuTXsMgSMVqPby2JvERw16E/Ado/MtbAt4UhLb26ffa1xHdSSncMhJE0yhCopt85R/ BTKUhEG1eNEOh3eyhxz6gFGv7dM0m08P4yH7XYavoI8Kajg7ktb770ulR9QMNFHfUd97 HFlfr4VSa2Yq5QsaGE3FUw49CA6CSaNIqemc0t1k+H6y3uwPA7aDRYzN+0f9qV8g1k+u Fsmq8cy0I1nIEffHtpkHEyPRzAW3U+PMFK922vQrbXMHEBjhzPyquIpFbmCAfe3uesbG 6wv3OKwK6UOfcL812p+545ZFOpzJPlRaD54LLbUVzqf/3uTDJjm1g/lswVZPL9emCO3E 8mGw== X-Gm-Message-State: AOJu0YzipjRYwXKwkiBKP+omwoAvT3iPJDbC685u22MGDlkBQdSdMdI9 VbfmlaaHnGiIo0dSw60lTPJ/zZJxqYQzE5lp0sPCj2xkLHfJL8zlw6FrG4Tb8x7TA4sxIg21hXc FlyvFA7I04sye8KojxDaw98Wi X-Received: by 2002:a17:906:cc4a:b0:9a5:852f:10ae with SMTP id mm10-20020a170906cc4a00b009a5852f10aemr2068151ejb.60.1695830871402; Wed, 27 Sep 2023 09:07:51 -0700 (PDT) X-Received: by 2002:a17:906:cc4a:b0:9a5:852f:10ae with SMTP id mm10-20020a170906cc4a00b009a5852f10aemr2068130ejb.60.1695830871071; Wed, 27 Sep 2023 09:07:51 -0700 (PDT) Received: from ?IPV6:2a02:810d:4b3f:de9c:642:1aff:fe31:a15c? ([2a02:810d:4b3f:de9c:642:1aff:fe31:a15c]) by smtp.gmail.com with ESMTPSA id e8-20020a170906374800b0099cf840527csm9523564ejc.153.2023.09.27.09.07.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 27 Sep 2023 09:07:50 -0700 (PDT) Message-ID: <83c1b1df-7e5e-8b71-358a-9c34969dc695@redhat.com> Date: Wed, 27 Sep 2023 18:07:49 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [Nouveau] [PATCH] drm/nouveau/kms/nv50: hide unused variables Content-Language: en-US To: Arnd Bergmann , Karol Herbst , Lyude Paul , David Airlie , Daniel Vetter , Danilo Krummrich , Ben Skeggs Cc: nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Arnd Bergmann , Wayne Lin References: <20230925155930.677620-1-arnd@kernel.org> From: Danilo Krummrich Organization: RedHat In-Reply-To: <20230925155930.677620-1-arnd@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Wed, 27 Sep 2023 09:08:46 -0700 (PDT) On 9/25/23 17:59, Arnd Bergmann wrote: > From: Arnd Bergmann > > After a recent change, two variables are only used in an #ifdef: > > drivers/gpu/drm/nouveau/dispnv50/disp.c: In function 'nv50_sor_atomic_disable': > drivers/gpu/drm/nouveau/dispnv50/disp.c:1569:13: error: unused variable 'ret' [-Werror=unused-variable] > 1569 | int ret; > | ^~~ > drivers/gpu/drm/nouveau/dispnv50/disp.c:1568:28: error: unused variable 'aux' [-Werror=unused-variable] > 1568 | struct drm_dp_aux *aux = &nv_connector->aux; > | ^~~ > > Move them into the same conditional block, along with the nv_connector variable > that becomes unused during that fix. > > Fixes: 757033808c95b ("drm/nouveau/kms/nv50-: fixup sink D3 before tearing down link") > Signed-off-by: Arnd Bergmann Applied to drm-misc-next, thanks! > --- > drivers/gpu/drm/nouveau/dispnv50/disp.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c > index 52f1569ee37c1..a0ac8c258d9ff 100644 > --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c > +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c > @@ -1560,15 +1560,13 @@ nv50_sor_atomic_disable(struct drm_encoder *encoder, struct drm_atomic_state *st > { > struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); > struct nv50_head *head = nv50_head(nv_encoder->crtc); > - struct nouveau_connector *nv_connector = nv50_outp_get_old_connector(state, nv_encoder); > #ifdef CONFIG_DRM_NOUVEAU_BACKLIGHT > + struct nouveau_connector *nv_connector = nv50_outp_get_old_connector(state, nv_encoder); > struct nouveau_drm *drm = nouveau_drm(nv_encoder->base.base.dev); > struct nouveau_backlight *backlight = nv_connector->backlight; > -#endif > struct drm_dp_aux *aux = &nv_connector->aux; > int ret; > > -#ifdef CONFIG_DRM_NOUVEAU_BACKLIGHT > if (backlight && backlight->uses_dpcd) { > ret = drm_edp_backlight_disable(aux, &backlight->edp_info); > if (ret < 0)