From patchwork Mon Mar 22 10:52:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 406098 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp3455459jai; Mon, 22 Mar 2021 03:53:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUQlAHGeDROIWHRKVZhpVXH0jnSriFgRvhF4CdvEqnNA8bA+cTysrq/C+/kPq6cJTo0f91 X-Received: by 2002:a62:8ccc:0:b029:1f6:c5e2:69ff with SMTP id m195-20020a628ccc0000b02901f6c5e269ffmr21589961pfd.46.1616410396069; Mon, 22 Mar 2021 03:53:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616410396; cv=none; d=google.com; s=arc-20160816; b=xLdZxqzeZyL55BUZNEDTKTf+dlKTnAwFcrQ8U6SVknkbBbTk28kvxgW3O/kAoT8HKx +Ied9Y5D9B6AI/LJQd1SMOPXLojjXoNHd9bnQLycXknEmq7+sYVlf/0otyiDGZkGCHx3 OD3uaVGDhyoMm8Qj+9MYs2gvZguznXOpbBVsd0KIu4UlgDevT4JqWYZUVviQHGm1QYyi uXPpdGh9U2VRIAUeX7v6a24dsQQ9GSTyZaFSX3SwDhRdEoEe6CJ9bs+KHt74xYEXR8/F Nyz8qgz/IYZrokykhDyIq4h+ZsS4rPBOpvPRN22tfxFiigm3j24QYmV/ofcgZ15K8x0y 5PJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=GLMtWq5ptNbT2upzEjNRqw9pI/JNjLnacyec2Equ9io=; b=Hq6IlMS7Gt4K+4Du0ZKMj1vLVU90D04lKU0nsnWyLUzydAgNtKJL11dWbKNtTFE24D ZESsa9fjuOOe6tCn2HSufzkuyi5gGSGndvTlIoyrbfOduJapaw1XTtbsEo1vkoBg+pQC wOaF7Yj8QoptGZvNJ/cO39DpUwLiO4Q1ZLWh1cWDd+Nnar9t1OGWTSq0GF3dwxsR3nw/ ux24LAtN+aqhdoJktIK7sxwqu2G8jPxtQD3tpx4s72PnzOAnnfYN8OKZji/DO1JqCW5U p6JABv6U259dcV7aXRSlHQLSDzRLxnczcbFMht45XqVvmRcl6wDJxbIBUirulyl0AR33 wHzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@kernel.org header.s=k20201202 header.b=RgVbcb5G; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id y11si15822536plt.292.2021.03.22.03.53.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Mar 2021 03:53:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@kernel.org header.s=k20201202 header.b=RgVbcb5G; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1E9D589E9E; Mon, 22 Mar 2021 10:53:15 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id 20B3D89E9E for ; Mon, 22 Mar 2021 10:53:13 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 4B10661983; Mon, 22 Mar 2021 10:53:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616410391; bh=4U0eak1ORtelSunJ9eE7hPB3yqAxnqQRBSFUlGf+63c=; h=From:To:Cc:Subject:Date:From; b=RgVbcb5GDL09XMuNQ6ApRvSec2jt7qHQUtsB2qr0geekYNbvLm3amzMeHiPM946Uf Cx+8jLIVhr+YZxrmgmMTIGIK6bysN08+ys+ORnyf3sDus3Iyd2ziWZKI/bhctiXAfs Q/MXso1NWbkvBHfvVVZPv5XDYGuGq/aWV0534Qe4ljZHiFeYnyYz3fV/4vuI6FDzfS 7n4r6bbscyZZk8UJSFtvJPIlNUkx+Eglq3PM5ikRJEi/VzThTl1lTNdiriwlZ5tTj4 QZ2ZrJLUtkAYEvlxqhW2ssKRjo+eNWLSXpyZCuAu6X+CTxJzGI9JQ0jfNtmxL6/Blo TiIiMRucxsIew== From: Arnd Bergmann To: dri-devel@lists.freedesktop.org Subject: [PATCH 1/2] fbdev: omapfb: avoid -Wempty-body warning Date: Mon, 22 Mar 2021 11:52:59 +0100 Message-Id: <20210322105307.1291840-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 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, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Arnd Bergmann Building with 'make W=1' shows a few harmless warnings: drivers/video/fbdev/omap2/omapfb/omapfb-main.c: In function 'omapfb_calc_addr': drivers/video/fbdev/omap2/omapfb/omapfb-main.c:823:56: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 823 | var->xoffset, var->yoffset, offset); | ^ drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c: In function 'omapfb_ioctl': drivers/video/fbdev/omap2/omapfb/omapfb-ioctl.c:911:45: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 911 | DBG("ioctl failed: %d\n", r); Avoid these by using no_printk(), which adds format string checking as well. Signed-off-by: Arnd Bergmann --- drivers/video/fbdev/omap2/omapfb/omapfb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.29.2 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel Reviewed-by: Geert Uytterhoeven diff --git a/drivers/video/fbdev/omap2/omapfb/omapfb.h b/drivers/video/fbdev/omap2/omapfb/omapfb.h index d27abccb37bc..1c1b5201c8b6 100644 --- a/drivers/video/fbdev/omap2/omapfb/omapfb.h +++ b/drivers/video/fbdev/omap2/omapfb/omapfb.h @@ -29,7 +29,7 @@ extern bool omapfb_debug; printk(KERN_DEBUG "OMAPFB: " format, ## __VA_ARGS__); \ } while (0) #else -#define DBG(format, ...) +#define DBG(format, ...) no_printk(format, ## __VA_ARGS__) #endif #define FB2OFB(fb_info) ((struct omapfb_info *)(fb_info->par)) From patchwork Mon Mar 22 10:53:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 406099 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp3455519jai; Mon, 22 Mar 2021 03:53:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1qgphcMuqbacOyiaCXgQqXJ6eLyrY47Qfs+TtXh06emvYxW2dnypOISis2oi6hKOfrxHP X-Received: by 2002:a63:1022:: with SMTP id f34mr3957419pgl.263.1616410401862; Mon, 22 Mar 2021 03:53:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616410401; cv=none; d=google.com; s=arc-20160816; b=b3zuTaYCr323iu4a0wZLzGqhSRQbTopzxW+s0BKy3zYra/gOS8YP4oOQQfa53g57Ol g8MFXhUsCHvwW+4YPtYMyYooBNg//ON3CE3hEy7BGgWpLl8u61ICYN6gdTYKoApTEVIK MIWCxhNw6SvAWGf48do7rNCx2JjqwNHdXpsST3UqMqnKxMI4kkwxgw7R8bfOln/erOVr PnQXl13VQrEoKUXQMJZUSsvQMoPK8V3Osu7BiabrUlebZxGP17BGuG31wN9RFmYxjvKN +HS8piWytlJYGiD8BTi1rh9I7f8C5DPHutr8leRcjWK6CfLGu5A+paOBC9lr+ZBocs08 Noyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:delivered-to; bh=ndfiES8Oh/j3OV+ruSsQfAFfCfmiSeE+9oqR33M12fU=; b=m6+97E6Q7oSl4CF0+SNvzBzpuq4TlMJ/9Edzz8kS4LKo6ZzkqJxXyRdbUi6j0gLGYZ R/VUmTewU1VHxyDm145kwJRVKSRuLx9Z+IDRCTykEB4M9QJlrLsirsGtamj1hrgKPiUr n7jMI1yjPjGJjkTq5Gh8fWjXfTicjzJqsPWxp5oG6uRZUohuxVhtQDolfW1qoG/maHQJ vXrRw1k7G5PBoRddemD10Joenw+duSLMhUfBfea9da32FLzW+/DGS7Q5n9z0JzqDVqwV hCK/C8U7I3W1C9Fdvz28l90kmKgCHqS//5wrUGRnuf++06oikNjfwkMT25Gg984oZeOQ DKgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@kernel.org header.s=k20201202 header.b="jCiV//so"; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id n15si15454552plc.260.2021.03.22.03.53.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Mar 2021 03:53:21 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@kernel.org header.s=k20201202 header.b="jCiV//so"; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0675389EAE; Mon, 22 Mar 2021 10:53:21 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id AB9FC89EAC for ; Mon, 22 Mar 2021 10:53:20 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id B135861585; Mon, 22 Mar 2021 10:53:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616410400; bh=dgFzVnRh0FbIORkPoqNN87sf585VX/uTn2y5kQW8Hro=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jCiV//so53WUOq7dRrF8KK3IJ4Lpd9GKJ8HbUGEsYSesGyXSRjqhwVzVCwranxQ7r VM9b4tNbRwXFCRHmZUQEqcQL6vVhOXjXDcbO5T1LrcYp8AMH+FuQXQbjX+o2ZspSy2 qxmOK1A1aJhvQt8H70vzrL7bM/yAVUyB4hRuABBIukZkAnPZnV2FcfzMr5yodk9iZP y7fQywTeomlVUGK8LIiT9C8/cqI9CnpaRhCkvqLpQhZpYZW+ljo1sP8OmIgXtteBfD sSt5McPUvfdHshGgD6WIf+DWHyOMTCFGSt6CyRdDyaW5Y2eiS9jn5+5T0nBNTPiP0z DqrnwpU7et9Eg== From: Arnd Bergmann To: dri-devel@lists.freedesktop.org, Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter Subject: [PATCH 2/2] vgaarb: avoid -Wempty-body warnings Date: Mon, 22 Mar 2021 11:53:00 +0100 Message-Id: <20210322105307.1291840-2-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210322105307.1291840-1-arnd@kernel.org> References: <20210322105307.1291840-1-arnd@kernel.org> MIME-Version: 1.0 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, Yue Zou , linux-kernel@vger.kernel.org, Arnd Bergmann Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Arnd Bergmann Building with W=1 shows a few warnings for an empty macro: drivers/gpu/drm/qxl/qxl_drv.c: In function 'qxl_pci_probe': drivers/gpu/drm/qxl/qxl_drv.c:131:50: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 131 | vga_put(pdev, VGA_RSRC_LEGACY_IO); | ^ drivers/gpu/drm/qxl/qxl_drv.c: In function 'qxl_pci_remove': drivers/gpu/drm/qxl/qxl_drv.c:159:50: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 159 | vga_put(pdev, VGA_RSRC_LEGACY_IO); Change this to an inline function to make it more robust and avoid the warning. Signed-off-by: Arnd Bergmann --- include/linux/vgaarb.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.29.2 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel diff --git a/include/linux/vgaarb.h b/include/linux/vgaarb.h index fc6dfeba04a5..dc6ddce92066 100644 --- a/include/linux/vgaarb.h +++ b/include/linux/vgaarb.h @@ -112,7 +112,9 @@ static inline int vga_get_uninterruptible(struct pci_dev *pdev, #if defined(CONFIG_VGA_ARB) extern void vga_put(struct pci_dev *pdev, unsigned int rsrc); #else -#define vga_put(pdev, rsrc) +static inline void vga_put(struct pci_dev *pdev, unsigned int rsrc) +{ +} #endif