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