From patchwork Sun Mar 15 04:09:57 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 11438723 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 0060B6CA for ; Sun, 15 Mar 2020 07:16:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CAF03206E9 for ; Sun, 15 Mar 2020 07:16:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="X4ZzG6l2" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727719AbgCOHPf (ORCPT ); Sun, 15 Mar 2020 03:15:35 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:49192 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727444AbgCOHPe (ORCPT ); Sun, 15 Mar 2020 03:15:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Sender:Reply-To:Content-ID:Content-Description; bh=geChFULqiY9Qc5SvHVzZJBad8vXBVakwRLiv7qGppg4=; b=X4ZzG6l2kt6LRNml+3PFZwy6FU XeJ297XxbtTXbNwsU7xOEUT2qsnoYDV8tE9+0HZuP6EJNNjbTmdttTl3q+M3vJEeqDVFRRRGh5ye8 0QdJOjuOAqW/q0Bp/dS4Jcq8gE3w72u3wh+gS9nbovQVOdQQIkY/qpLL1Nc6WqR+TspJsZN4h6khF 5nuQ5AXmif64N5/VPrM2DXs/WekAJcW+oGhPSjeK9v5giDPmeJMXlf7hsvEFxLAOX1qU45XvAa9zB /wlh3mRWmU/MK242NQy8FX9bh1l7ps0zA8oJl3AB4vg8GebzVoWJRQBqvQkpitIQS+mku+zkmhiNg UgTuGGqw==; Received: from [2601:1c0:6280:3f0::19c2] (helo=smtpauth.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jDKbE-0003dY-L5; Sun, 15 Mar 2020 04:10:04 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Bartlomiej Zolnierkiewicz , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, Antonino Daplas , Florian Tobias Schandinat Subject: [PATCH 1/6] fbdev: fbmon: fix -Wextra build warnings Date: Sat, 14 Mar 2020 21:09:57 -0700 Message-Id: <20200315041002.24473-2-rdunlap@infradead.org> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20200315041002.24473-1-rdunlap@infradead.org> References: <20200315041002.24473-1-rdunlap@infradead.org> MIME-Version: 1.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org When 'DEBUG' is not defined, modify the DPRINTK() macro to use the no_printk() macro instead of using . This fixes a build warning when -Wextra is used and provides printk format checking: ../drivers/video/fbdev/core/fbmon.c:812:47: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] ../drivers/video/fbdev/core/fbmon.c:842:24: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body] ../drivers/video/fbdev/core/fbmon.c:847:24: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body] Signed-off-by: Randy Dunlap Cc: Bartlomiej Zolnierkiewicz Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org --- Alternative: use pr_debug() so that CONFIG_DYNAMIC_DEBUG can be used at these sites. drivers/video/fbdev/core/fbmon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- linux-next-20200313.orig/drivers/video/fbdev/core/fbmon.c +++ linux-next-20200313/drivers/video/fbdev/core/fbmon.c @@ -44,7 +44,7 @@ #ifdef DEBUG #define DPRINTK(fmt, args...) printk(fmt,## args) #else -#define DPRINTK(fmt, args...) +#define DPRINTK(fmt, args...) no_printk(fmt, ##args) #endif #define FBMON_FIX_HEADER 1 From patchwork Sun Mar 15 04:09:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 11438725 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 338E81668 for ; Sun, 15 Mar 2020 07:16:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0A384206E9 for ; Sun, 15 Mar 2020 07:16:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="eYCPhWna" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727703AbgCOHPf (ORCPT ); Sun, 15 Mar 2020 03:15:35 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:49192 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727163AbgCOHPe (ORCPT ); Sun, 15 Mar 2020 03:15:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Sender:Reply-To:Content-ID:Content-Description; bh=rMp7B3SVvE6I2C7kB0azgCg8wG5bTyv58BZYlsnbCqQ=; b=eYCPhWnamD9HpQqcnaeiPnYewi Lz5iHnOWc0EigcAeRzS40a0qC+BeCnD+pfRGAgr2wSYr7qR1AIVQFkFRr8xBAurwjtXUL5BPpwD/6 1KxwOciMpG0f5Fpojl4SXPPicosfRI55uDPZv3vFqbLYp2PpxWGKJOuQ8X+f6yYA8aNvPqP6Rsbm2 ne/v8ifpfEcQuSnrUOdNaieNosokO2JNVuNZl31juxFJi0K1i0PlwkqmVIAD8NeJ2ap2Dn1WjZ3eA 9d6NpjtB2yADL+tsqL0EOhxz1uD/WodZ3BFGK2BAtvQrvx5w5owo/iTPh6+nFvzkYCdj2MgRU7qAj 8IleLKvA==; Received: from [2601:1c0:6280:3f0::19c2] (helo=smtpauth.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jDKbF-0003dY-2v; Sun, 15 Mar 2020 04:10:05 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Bartlomiej Zolnierkiewicz , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, Antonino Daplas , Florian Tobias Schandinat Subject: [PATCH 2/6] fbdev: aty: fix -Wextra build warning Date: Sat, 14 Mar 2020 21:09:58 -0700 Message-Id: <20200315041002.24473-3-rdunlap@infradead.org> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20200315041002.24473-1-rdunlap@infradead.org> References: <20200315041002.24473-1-rdunlap@infradead.org> MIME-Version: 1.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org When 'DEBUG' is not defined, modify the DPRINTK() macro to use the no_printk() macro instead of using . This fixes a build warning when -Wextra is used and provides printk format checking: ../drivers/video/fbdev/aty/atyfb_base.c:784:61: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] Signed-off-by: Randy Dunlap Cc: Bartlomiej Zolnierkiewicz Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org --- Alternative: use pr_debug() so that CONFIG_DYNAMIC_DEBUG can be used at these sites. drivers/video/fbdev/aty/atyfb_base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- linux-next-20200313.orig/drivers/video/fbdev/aty/atyfb_base.c +++ linux-next-20200313/drivers/video/fbdev/aty/atyfb_base.c @@ -126,7 +126,7 @@ #ifdef DEBUG #define DPRINTK(fmt, args...) printk(KERN_DEBUG "atyfb: " fmt, ## args) #else -#define DPRINTK(fmt, args...) +#define DPRINTK(fmt, args...) no_printk(fmt, ##args) #endif #define PRINTKI(fmt, args...) printk(KERN_INFO "atyfb: " fmt, ## args) From patchwork Sun Mar 15 04:09:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 11438727 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 08D636CA for ; Sun, 15 Mar 2020 07:16:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D827C206E9 for ; Sun, 15 Mar 2020 07:16:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="rcYdKyFv" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727674AbgCOHQH (ORCPT ); Sun, 15 Mar 2020 03:16:07 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:49192 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727223AbgCOHPe (ORCPT ); Sun, 15 Mar 2020 03:15:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Sender:Reply-To:Content-ID:Content-Description; bh=Va4hKd5UNxovGjVSxksW2kq4jkfcUPbqde9Oaz+go/c=; b=rcYdKyFvOVbMXkJsWJ4j39OuWV LztEjhk8AYp0LBMKYFosLO5hXiKZcXQG+X64+9zbzjLy7n9nQ3Q3CKZ2u4j9naJb3rW0t5YBB+ont 1RM3Yw71w99ROvZDW1a1FCtulbooAp0uyavD+RdD1yTIAYOgmciTdJqF9uEXixLdMW8gP3icOpVM2 VlGJftnoYsamCg98ZdS47t+J51YOIEmK8K7qNFYQRW+tebbBWqzXlrB3xLr9URuugr43TYAM5mzg/ IygbqCJLHojxQveps9ropruKVmcvtp/u0AQV2L8tBX29l0EE86jsdZ9v57ewAX66zHgG48KezL5Yn j5BPnSlw==; Received: from [2601:1c0:6280:3f0::19c2] (helo=smtpauth.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jDKbF-0003dY-Gm; Sun, 15 Mar 2020 04:10:05 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Bartlomiej Zolnierkiewicz , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, Antonino Daplas , Florian Tobias Schandinat Subject: [PATCH 3/6] fbdev: matrox: fix -Wextra build warnings Date: Sat, 14 Mar 2020 21:09:59 -0700 Message-Id: <20200315041002.24473-4-rdunlap@infradead.org> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20200315041002.24473-1-rdunlap@infradead.org> References: <20200315041002.24473-1-rdunlap@infradead.org> MIME-Version: 1.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org When 'DEBUG' is not defined, modify the dprintk() macro to use the no_printk() macro instead of using . This fixes build warnings when -Wextra is used and provides printk format checking: ../drivers/video/fbdev/matrox/matroxfb_base.c:635:77: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] ../drivers/video/fbdev/matrox/matroxfb_Ti3026.c:632:54: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body] ../drivers/video/fbdev/matrox/matroxfb_Ti3026.c:654:53: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body] Signed-off-by: Randy Dunlap Cc: Bartlomiej Zolnierkiewicz Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org --- Alternative: use pr_debug() so that CONFIG_DYNAMIC_DEBUG can be used at these sites. drivers/video/fbdev/matrox/matroxfb_base.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- linux-next-20200313.orig/drivers/video/fbdev/matrox/matroxfb_base.h +++ linux-next-20200313/drivers/video/fbdev/matrox/matroxfb_base.h @@ -86,7 +86,7 @@ #ifdef DEBUG #define dprintk(X...) printk(X) #else -#define dprintk(X...) +#define dprintk(X...) no_printk(X) #endif #ifndef PCI_SS_VENDOR_ID_SIEMENS_NIXDORF From patchwork Sun Mar 15 04:10:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 11438729 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 B2F5C6CA for ; Sun, 15 Mar 2020 07:16:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 92C6920637 for ; Sun, 15 Mar 2020 07:16:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="YEXf6+YU" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727223AbgCOHQL (ORCPT ); Sun, 15 Mar 2020 03:16:11 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:49192 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727498AbgCOHPe (ORCPT ); Sun, 15 Mar 2020 03:15:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Sender:Reply-To:Content-ID:Content-Description; bh=Ud1rAlaZkbW3xeGSxpDHwIRUPo7qLdRG5FQjrplQSJc=; b=YEXf6+YUjq0EgZ0bQ46uq2Ln4b QF3CF/JlzvgozkKgXHgGdP93FfaspPJA5A3KZNCZmZO/mDLIwbPMFVevaywjP5zewRTFAv2mPqBRh m8P8wwFxXPgUHUE8XrWLU19AwuhU2VbnpRaWnxmf/Vzavi+B8+j/29t1WWl7QMInlwxrflQqrmWB1 AtHPi8p28EboB+wMLz0hXByXxHSxNnrd2NmUG/feowoRpvkWWkBnoHlArY9W7AXiU8AZ2mhu/Dd4t bB7PPAoVTzEArlvSWjKZwOOS96GQcy36MYRwEhm642gWk+f8geny0ks0Ls1bBi0IEqtHiPwVnDX4K ZhdA0wDg==; Received: from [2601:1c0:6280:3f0::19c2] (helo=smtpauth.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jDKbF-0003dY-V2; Sun, 15 Mar 2020 04:10:06 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Bartlomiej Zolnierkiewicz , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, Antonino Daplas , Florian Tobias Schandinat Subject: [PATCH 4/6] fbdev: savage: fix -Wextra build warning Date: Sat, 14 Mar 2020 21:10:00 -0700 Message-Id: <20200315041002.24473-5-rdunlap@infradead.org> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20200315041002.24473-1-rdunlap@infradead.org> References: <20200315041002.24473-1-rdunlap@infradead.org> MIME-Version: 1.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org When 'SAVAGEFB_DEBUG' is not defined, modify the DBG() macro to use the no_printk() macro instead of using . This fixes a build warning when -Wextra is used and provides printk format checking: ../drivers/video/fbdev/savage/savagefb_driver.c:2411:13: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] Signed-off-by: Randy Dunlap Cc: Antonino Daplas Cc: Bartlomiej Zolnierkiewicz Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org --- Alternative: use pr_debug() so that CONFIG_DYNAMIC_DEBUG can be used at these sites. drivers/video/fbdev/savage/savagefb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- linux-next-20200313.orig/drivers/video/fbdev/savage/savagefb.h +++ linux-next-20200313/drivers/video/fbdev/savage/savagefb.h @@ -21,7 +21,7 @@ #ifdef SAVAGEFB_DEBUG # define DBG(x) printk (KERN_DEBUG "savagefb: %s\n", (x)); #else -# define DBG(x) +# define DBG(x) no_printk(x) # define SavagePrintRegs(...) #endif From patchwork Sun Mar 15 04:10:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 11438731 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 9257D14DD for ; Sun, 15 Mar 2020 07:16:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7264120637 for ; Sun, 15 Mar 2020 07:16:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="XAQtqekK" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727533AbgCOHPd (ORCPT ); Sun, 15 Mar 2020 03:15:33 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:49192 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727163AbgCOHPd (ORCPT ); Sun, 15 Mar 2020 03:15:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Sender:Reply-To:Content-ID:Content-Description; bh=GNC8Sm1AlFB7BS88maKHyPxziY/VU/zokv/Jjy4PIQ4=; b=XAQtqekKRTzL+RabbcoToO8+Pb 3np37/P21Ced4oj36Wl0MV+8yLB1fraYDdERnsakSucNF62N9JhQqt3yx6Ud09mbgDRb+H6QWe6DT bBXo5+mjzZr2S/bhQCNBTYFA0AnVT8qrzUyJLObxctj0vzABBwYIO+2aQjHp0c9XEHT5xzfJbs8VQ rtfcGFAiDuelgNF5rQQ7kCCKXgqPUMS+EfbFxZu825mtGTd+VXUzSnjHBGj/dcXw0eeAcrRcXYTUK TeVfRNtMOLJaWvGtLXjZkM7hKNlnP8iBqFOxsEKnFy3P/Clt7GHEC8B086MFnJizDK02opXuzOcj+ 7rSoS4+Q==; Received: from [2601:1c0:6280:3f0::19c2] (helo=smtpauth.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jDKbG-0003dY-Da; Sun, 15 Mar 2020 04:10:06 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Bartlomiej Zolnierkiewicz , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, Antonino Daplas , Florian Tobias Schandinat Subject: [PATCH 5/6] fbdev: pm[23]fb.c: fix -Wextra build warnings and errors Date: Sat, 14 Mar 2020 21:10:01 -0700 Message-Id: <20200315041002.24473-6-rdunlap@infradead.org> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20200315041002.24473-1-rdunlap@infradead.org> References: <20200315041002.24473-1-rdunlap@infradead.org> MIME-Version: 1.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org When 'DEBUG' is not defined, modify the DPRINTK() macro to use the no_printk() macro instead of using . This fixes build warnings when -Wextra is used and provides printk format checking: ../drivers/video/fbdev/pm2fb.c:227:38: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body] ../drivers/video/fbdev/pm3fb.c:1039:33: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body] Also drop one argument in two DPRINTK() macro uses to provide the correct number of arguments and use the correct field in one case to fix a build error: ../drivers/video/fbdev/pm3fb.c:353:9: error: ‘struct fb_info’ has no member named ‘current_par’ info->current_par->depth); Signed-off-by: Randy Dunlap Cc: Bartlomiej Zolnierkiewicz Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org --- Alternative: use pr_debug() so that CONFIG_DYNAMIC_DEBUG can be used at these sites. drivers/video/fbdev/pm2fb.c | 2 +- drivers/video/fbdev/pm3fb.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) --- linux-next-20200313.orig/drivers/video/fbdev/pm2fb.c +++ linux-next-20200313/drivers/video/fbdev/pm2fb.c @@ -54,7 +54,7 @@ #define DPRINTK(a, b...) \ printk(KERN_DEBUG "pm2fb: %s: " a, __func__ , ## b) #else -#define DPRINTK(a, b...) +#define DPRINTK(a, b...) no_printk(a, ##b) #endif #define PM2_PIXMAP_SIZE (1600 * 4) --- linux-next-20200313.orig/drivers/video/fbdev/pm3fb.c +++ linux-next-20200313/drivers/video/fbdev/pm3fb.c @@ -44,7 +44,7 @@ #define DPRINTK(a, b...) \ printk(KERN_DEBUG "pm3fb: %s: " a, __func__ , ## b) #else -#define DPRINTK(a, b...) +#define DPRINTK(a, b...) no_printk(a, ##b) #endif #define PM3_PIXMAP_SIZE (2048 * 4) @@ -306,7 +306,7 @@ static void pm3fb_init_engine(struct fb_ PM3PixelSize_GLOBAL_32BIT); break; default: - DPRINTK(1, "Unsupported depth %d\n", + DPRINTK("Unsupported depth %d\n", info->var.bits_per_pixel); break; } @@ -349,8 +349,8 @@ static void pm3fb_init_engine(struct fb_ (1 << 10) | (0 << 3)); break; default: - DPRINTK(1, "Unsupported depth %d\n", - info->current_par->depth); + DPRINTK("Unsupported depth %d\n", + info->var.bits_per_pixel); break; } } From patchwork Sun Mar 15 04:10:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 11438721 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 5F41D1668 for ; Sun, 15 Mar 2020 07:15:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3F61F20637 for ; Sun, 15 Mar 2020 07:15:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="st8Z+DAS" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727447AbgCOHPd (ORCPT ); Sun, 15 Mar 2020 03:15:33 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:49192 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727223AbgCOHPd (ORCPT ); Sun, 15 Mar 2020 03:15:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Sender:Reply-To:Content-ID:Content-Description; bh=IqXEYpa5QgkSb9VlNMgtVjJmY+6NusNQBweUhfnvqp0=; b=st8Z+DASEhH4MF2YEy3O7Q3W6m ieV0AF3sEphRQ+YXwVyizUW9BSHyPlTmuG/DzO7MH8nomb+B1zTjDCZSwMvkiLS8Mk8RkVNdAQ71p V7luiwLAvDw+HuTGnjQmE4H/c2kXZjO/pcQf7bj3blBtaJ0yp7vpys1hzD45B1/Ck00vNmgzY0Bt6 yafwZtkt191zuX5YXonoA3ibN5E/NwTcqCUsmuPwXQClA1M8wvNN1GZVl2InBCE+f/IXwjPUGM3az 9S/aaUKIhT+SyGg0/H/RWEA36kqpaZZG8RQLp24OqUsuSh8nf56D+8lc8isZ0hvLWnptgSP7/fQt9 +uvaIZIg==; Received: from [2601:1c0:6280:3f0::19c2] (helo=smtpauth.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1jDKbG-0003dY-Rq; Sun, 15 Mar 2020 04:10:06 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Bartlomiej Zolnierkiewicz , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, Antonino Daplas , Florian Tobias Schandinat Subject: [PATCH 6/6] fbdev: via: fix -Wextra build warning and format warning Date: Sat, 14 Mar 2020 21:10:02 -0700 Message-Id: <20200315041002.24473-7-rdunlap@infradead.org> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20200315041002.24473-1-rdunlap@infradead.org> References: <20200315041002.24473-1-rdunlap@infradead.org> MIME-Version: 1.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org When 'VIAFB_DEBUG' and 'VIAFB_WARN' are not defined, modify the DEBUG_MSG() &WARN_MSG() macros to use the no_printk() macro instead of using . This fixes a build warning when -Wextra is used and provides printk format checking: ../drivers/video/fbdev/via/ioctl.c:88:47: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body] Also use %lu to print an unsigned long instead of just %l, to fix a printk format warning: ../drivers/video/fbdev/via/viafbdev.c: In function ‘viafb_dvp0_proc_write’: ../drivers/video/fbdev/via/viafbdev.c:1148:14: warning: unknown conversion type character ‘]’ in format [-Wformat=] DEBUG_MSG("DVP0:reg_val[%l]=:%x\n", i, Signed-off-by: Randy Dunlap Cc: Florian Tobias Schandinat Cc: Bartlomiej Zolnierkiewicz Cc: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org --- Alternative: use pr_debug() so that CONFIG_DYNAMIC_DEBUG can be used at these sites. drivers/video/fbdev/via/debug.h | 6 ++++-- drivers/video/fbdev/via/viafbdev.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) --- linux-next-20200313.orig/drivers/video/fbdev/via/debug.h +++ linux-next-20200313/drivers/video/fbdev/via/debug.h @@ -7,6 +7,8 @@ #ifndef __DEBUG_H__ #define __DEBUG_H__ +#include + #ifndef VIAFB_DEBUG #define VIAFB_DEBUG 0 #endif @@ -14,14 +16,14 @@ #if VIAFB_DEBUG #define DEBUG_MSG(f, a...) printk(f, ## a) #else -#define DEBUG_MSG(f, a...) +#define DEBUG_MSG(f, a...) no_printk(f, ## a) #endif #define VIAFB_WARN 0 #if VIAFB_WARN #define WARN_MSG(f, a...) printk(f, ## a) #else -#define WARN_MSG(f, a...) +#define WARN_MSG(f, a...) no_printk(f, ## a) #endif #endif /* __DEBUG_H__ */ --- linux-next-20200313.orig/drivers/video/fbdev/via/viafbdev.c +++ linux-next-20200313/drivers/video/fbdev/via/viafbdev.c @@ -1144,7 +1144,7 @@ static ssize_t viafb_dvp0_proc_write(str if (value != NULL) { if (kstrtou8(value, 0, ®_val) < 0) return -EINVAL; - DEBUG_MSG(KERN_INFO "DVP0:reg_val[%l]=:%x\n", i, + DEBUG_MSG(KERN_INFO "DVP0:reg_val[%lu]=:%x\n", i, reg_val); switch (i) { case 0: