Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1372947rdh; Mon, 25 Sep 2023 10:38:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE3BKkbjry91r1qtBujlC8GtFRiJph8DYH26WP4PR6BHbU54ESaST/nfx/mMSFOFkltAdgx X-Received: by 2002:a05:6a20:4409:b0:153:7515:9919 with SMTP id ce9-20020a056a20440900b0015375159919mr10682330pzb.21.1695663529064; Mon, 25 Sep 2023 10:38:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695663529; cv=none; d=google.com; s=arc-20160816; b=zX4MYgxkJXAHv0ZTtNl8SLkj/Sg214wfYc8CFLna2EP9e3p1LVPtgLDn//yRbg0BoO U6db3k6nmJfiKjCb+bl9mY29bivYqfTU0BSToqhWJhyHounykQgrcFd/E0ZPgzVloDfW MtF1WN7oxeMHwgJDyuLOxWA/jZmjBPUWMoAQjI+Tf+sYKYivmZMEiSG9T9QqvnGD0p8a mbD4pBf45qNHmPg5RashAWhKUwazndVGThMDtP1gPvXsTm7ytcSMtfW1fH5h4NOuvcnv aiH/wKemsVkLnXDKuGcecNJZRYX/1O5sopiMXgtV0L3JbdKWw6kOSIYBcgpKzgGQ2zEQ 4VpQ== 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=+ApHJYm+lfPiZbG4Wy00xY128o7ToFt5i/ZRlcwagG4=; fh=4E0Z4U+ozTYRpHVY0CznDjciP8jIE7RpCNcvHuDrcyo=; b=J3/J8qIfE/Xx3Y5iUYzDbCMp1aUIKBRJbRBT2qAbwR+s7y514aWKbRi7wj1u0XGAay mYnmc/HH+hMF8TBw9Z3I791nxj+1rw8OsLU7BUuYPUzFGEpQBx+Kfn5W0BVdBUcRoh6b t4TMtRLPwDME+Xkd9aM1/hu7sL+eGqgcyjEIN1PqrRAZknto0py32HRcID7QSB8PN65X WP3WwQ9DYSvnx0naDB3VqOR3hrzKM5dsrD7JXslamgfwNyOmK2JHzhOD4M0p5y5aawaa p8I+iYZhaZ1itjLUmnKEmLZjTygCJ26vlUbR+eZ7czpZt8r3OXprwJK7sdLaSGom6uvz XpOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nKpHcquP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id f5-20020a056a0022c500b0068fbdfa7379si10583185pfj.311.2023.09.25.10.38.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 10:38:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nKpHcquP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 2B1B180FDDC1; Mon, 25 Sep 2023 08:59:47 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232936AbjIYP7s (ORCPT + 99 others); Mon, 25 Sep 2023 11:59:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34982 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233276AbjIYP7m (ORCPT ); Mon, 25 Sep 2023 11:59:42 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0FADB6 for ; Mon, 25 Sep 2023 08:59:35 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EFBFDC433C7; Mon, 25 Sep 2023 15:59:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695657575; bh=pFhRBn5GwxIYPM5GA2ar9CKtCGC8fLy/cMk2rpqwfMs=; h=From:To:Cc:Subject:Date:From; b=nKpHcquP8+qpdZLt67K5VWTRQ8F8VHGeW/s/Uz3bRUjhSCUGIAO+M62heq3Ln1oUn BqVhK74g1ZwO18Z5q6UibGNz7cIKYIR3WW9ClQMzEHD5hkJrjK/wxKssL+o3fJ6/OL jw/8SYU144MTXKzTsTSrGnvZVkp2lXbJX2Fa+4khSVpxapdA7DL2SFYKPdQMgQITk8 Np9XMbUqHAvK4U5R4bItqWB48mk+z7SiLTVMBVYEMvFJwexE9Ro1sD1OpxkYjPilNw 8rp3eC13Yq4SqzPQqk0oaD6QYJnBWKiar39Rl52y26Eu+GcHAxtMMZ/YHNUXqQsNlt k1TxET8DZlTOQ== From: Arnd Bergmann To: Karol Herbst , Lyude Paul , David Airlie , Daniel Vetter , Danilo Krummrich , Ben Skeggs Cc: Arnd Bergmann , Wayne Lin , dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/nouveau/kms/nv50: hide unused variables Date: Mon, 25 Sep 2023 17:59:24 +0200 Message-Id: <20230925155930.677620-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 25 Sep 2023 08:59:47 -0700 (PDT) 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 --- 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) -- 2.39.2