From patchwork Wed Oct 21 12:15:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 11848959 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0CF1415E6 for ; Wed, 21 Oct 2020 12:15:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E725A22249 for ; Wed, 21 Oct 2020 12:15:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2439935AbgJUMPP (ORCPT ); Wed, 21 Oct 2020 08:15:15 -0400 Received: from mx2.suse.de ([195.135.220.15]:52706 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2406570AbgJUMPP (ORCPT ); Wed, 21 Oct 2020 08:15:15 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 34D1BAD2C; Wed, 21 Oct 2020 12:15:14 +0000 (UTC) From: Thomas Zimmermann To: gregkh@linuxfoundation.org, daniel.vetter@ffwll.ch, b.zolnierkie@samsung.com, jirislaby@kernel.org, gustavoars@kernel.org, peda@axentia.se, jingxiangfeng@huawei.com, natechancellor@gmail.com, george.kennedy@oracle.com, yepeilin.cs@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, Thomas Zimmermann Subject: [PATCH] video/fbdev/core: Mark debug-only variable as __maybe_unused Date: Wed, 21 Oct 2020 14:15:12 +0200 Message-Id: <20201021121512.17774-1-tzimmermann@suse.de> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org Compiling fbcon.c gives ../drivers/video/fbdev/core/fbcon.c: In function 'fbcon_exit': ../drivers/video/fbdev/core/fbcon.c:3358:7: warning: variable 'pending' set but not used [-Wunused-but-set-variable] 3358 | int pending = 0; | ^~~~~~~ The variable pending is only used for fbcon debugging. It's unused otherwise. Mark it accordingly. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/core/fbcon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c index d03f62369734..aca1512b6e86 100644 --- a/drivers/video/fbdev/core/fbcon.c +++ b/drivers/video/fbdev/core/fbcon.c @@ -3355,7 +3355,7 @@ static void fbcon_exit(void) #endif for_each_registered_fb(i) { - int pending = 0; + int __maybe_unused pending = 0; mapped = 0; info = registered_fb[i];