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: 11439445 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 B4CC2913 for ; Sun, 15 Mar 2020 23:19:42 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9227520409 for ; Sun, 15 Mar 2020 23:19:42 +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" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9227520409 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B469B6E2DE; Sun, 15 Mar 2020 23:19:15 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by gabe.freedesktop.org (Postfix) with ESMTPS id DF57E6E11B for ; Sun, 15 Mar 2020 04:10:06 +0000 (UTC) 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 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 X-Mailman-Approved-At: Sun, 15 Mar 2020 23:19:06 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, Florian Tobias Schandinat , Randy Dunlap , dri-devel@lists.freedesktop.org, Bartlomiej Zolnierkiewicz Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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: 11439469 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 DB2961668 for ; Sun, 15 Mar 2020 23:20:13 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B893920409 for ; Sun, 15 Mar 2020 23:20:13 +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" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B893920409 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A56AF6E2DD; Sun, 15 Mar 2020 23:19:15 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by gabe.freedesktop.org (Postfix) with ESMTPS id DAA636E111 for ; Sun, 15 Mar 2020 04:10:06 +0000 (UTC) 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 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 X-Mailman-Approved-At: Sun, 15 Mar 2020 23:19:06 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, Florian Tobias Schandinat , Randy Dunlap , dri-devel@lists.freedesktop.org, Bartlomiej Zolnierkiewicz Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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: 11439447 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 8E703159A for ; Sun, 15 Mar 2020 23:19:45 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6BDCC20409 for ; Sun, 15 Mar 2020 23:19:45 +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" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6BDCC20409 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1C7256E2FF; Sun, 15 Mar 2020 23:19:18 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by gabe.freedesktop.org (Postfix) with ESMTPS id E00936E11C for ; Sun, 15 Mar 2020 04:10:06 +0000 (UTC) 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 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 X-Mailman-Approved-At: Sun, 15 Mar 2020 23:19:06 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, Florian Tobias Schandinat , Randy Dunlap , dri-devel@lists.freedesktop.org, Bartlomiej Zolnierkiewicz Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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: 11439473 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 55011913 for ; Sun, 15 Mar 2020 23:20:21 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3177920409 for ; Sun, 15 Mar 2020 23:20:21 +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" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3177920409 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D29716E2DC; Sun, 15 Mar 2020 23:20:00 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by gabe.freedesktop.org (Postfix) with ESMTPS id DEC856E119 for ; Sun, 15 Mar 2020 04:10:06 +0000 (UTC) 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 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 X-Mailman-Approved-At: Sun, 15 Mar 2020 23:19:06 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, Florian Tobias Schandinat , Randy Dunlap , dri-devel@lists.freedesktop.org, Bartlomiej Zolnierkiewicz Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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: 11439453 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 481F6159A for ; Sun, 15 Mar 2020 23:19:53 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2544E20409 for ; Sun, 15 Mar 2020 23:19:53 +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" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2544E20409 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 05D566E2D1; Sun, 15 Mar 2020 23:19:14 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by gabe.freedesktop.org (Postfix) with ESMTPS id 151206E102 for ; Sun, 15 Mar 2020 04:10:07 +0000 (UTC) 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 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 X-Mailman-Approved-At: Sun, 15 Mar 2020 23:19:06 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, Florian Tobias Schandinat , Randy Dunlap , dri-devel@lists.freedesktop.org, Bartlomiej Zolnierkiewicz Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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: 11439457 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 4AC93159A for ; Sun, 15 Mar 2020 23:19:57 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 274B320409 for ; Sun, 15 Mar 2020 23:19:57 +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" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 274B320409 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5D1756E2ED; Sun, 15 Mar 2020 23:19:17 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by gabe.freedesktop.org (Postfix) with ESMTPS id 68B166E102 for ; Sun, 15 Mar 2020 04:10:07 +0000 (UTC) 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 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 X-Mailman-Approved-At: Sun, 15 Mar 2020 23:19:06 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, Florian Tobias Schandinat , Randy Dunlap , dri-devel@lists.freedesktop.org, Bartlomiej Zolnierkiewicz Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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: