From patchwork Mon Sep 20 12:17:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 514309 Delivered-To: patch@linaro.org Received: by 2002:a02:c816:0:0:0:0:0 with SMTP id p22csp1993626jao; Mon, 20 Sep 2021 05:17:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZ2Z+WhawR1q7xMgmdJiFU+ejzqsXMcRjNDRM5ab2UX5UoGdR7KAMJZoc+axSRX+v14Wn1 X-Received: by 2002:a17:906:3054:: with SMTP id d20mr27799264ejd.294.1632140254361; Mon, 20 Sep 2021 05:17:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632140254; cv=none; d=google.com; s=arc-20160816; b=JvlyupmMiX4MC/M3bpDf6vmflCtVNj38jCYRuWyebBkml1uZn478DQpIrhRwmHyb43 HOmFqGJASSwar/uE1n//k5DGtV0CKc3YnmxSzzVq/or4AZQTNpgoerSIZxvu+ZSd07wC egzmjQKDiEafpq9dRP7WoX27xaioMPEUEQLERmO+BzueUDXo3T+1dzgcrSCh1Uf8Jb2G f2KZ74hoLAfQIpTXSzOW9G2ALciITDkEYlJpSIjtxjyw0dB4re9KlD3mWRfq7CEQB2zC fECWYyO3KxCeUXAT0782eTvdxoym5ewCpxPwOBWfU77YzTUD2zB7gHScYrHxvNcz6qFc /rig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=w7f/Bw0cbCq3zx8UcEO2RNg5UaHAdIZf/CSDNvQNMpw=; b=nlsGI+6Kwe6r2U9i/2IzjODPxdnwG13Z1PYZrEiE7H6W2Nd6PjPincBeyRzH9elcxm jKPaW9tV16m1e+aKVjl1JgkIqBvGCOCkWGTYaHRjDb/IguSqlybgWB1YsMggUplqBy7p jT88nfNqB4Bo8rfzGmZqWcrPMUDy+mW4Zas/86gIHL72VF8XOP9UiSr7/4KLdnLgwwi5 AbYanYI9aEBysBWzONtcS1uY1AQa89TlgJ/9wZKQg93X8vg1DZiESOzt7jM/BycmbqkG 6kEvJSOSvSdV7R45qcLz2Gdl5dGZwo+8Z5axL1m+FNVvjaqiSQG6u+QJcy816WHk01sK zVeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=S0yyYRkm; spf=pass (google.com: domain of linux-fbdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-fbdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s5si9233330edd.549.2021.09.20.05.17.34 for ; Mon, 20 Sep 2021 05:17:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-fbdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=S0yyYRkm; spf=pass (google.com: domain of linux-fbdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-fbdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234824AbhITMS7 (ORCPT ); Mon, 20 Sep 2021 08:18:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:46902 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233446AbhITMS7 (ORCPT ); Mon, 20 Sep 2021 08:18:59 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6D66860EB2; Mon, 20 Sep 2021 12:17:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632140252; bh=KgTqk1gSTq17sQT/2tIQgwIKULSbIMoi53KBq2fW1bw=; h=From:To:Cc:Subject:Date:From; b=S0yyYRkmJHq1+qDL8ZMbCZT0fIEQ/79B++xY98bOEQ05Ux3e22PN4f1rO2iIwFMzG Y/cLzh4fqW/UcPRWCQTFIvrCuunbeBdGRzy6ZDkUm6LP7wChwjTVNIJ3lMMwYEmUnt pLIyxSqmbr77LMoBcYD0cIhqvAs6CY/1DD7B6c/aSIsrxqzeNtiWXEakMpAVtRVgPB tQlKRY945gh/WYlSO0voQFNWapSWM6cPRskOVU4nyXhqK4OA/fWUCYfA/lbcyaaXeO G9HVPDd+5xbB59TOUdI0nUAnt5RZrVuFyv672T3dIybnrXF8N0cix53CRyqAjyY8Tc E9iyAT2kq5grg== From: Arnd Bergmann To: linux-fbdev@vger.kernel.org, "James E.J. Bottomley" , Helge Deller , Michael Ellerman , "David S. Miller" Cc: dri-devel@lists.freedesktop.org, Arnd Bergmann , Benjamin Herrenschmidt , Paul Mackerras , linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, sparclinux@vger.kernel.org Subject: [PATCH] agp: define proper stubs for empty helpers Date: Mon, 20 Sep 2021 14:17:19 +0200 Message-Id: <20210920121728.94045-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org From: Arnd Bergmann The empty unmap_page_from_agp() macro causes a warning when building with 'make W=1' on a couple of architectures: drivers/char/agp/generic.c: In function 'agp_generic_destroy_page': drivers/char/agp/generic.c:1265:28: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body] 1265 | unmap_page_from_agp(page); Change the definitions to a 'do { } while (0)' construct to make these more reliable. Signed-off-by: Arnd Bergmann --- arch/parisc/include/asm/agp.h | 4 ++-- arch/powerpc/include/asm/agp.h | 4 ++-- arch/sparc/include/asm/agp.h | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) -- 2.29.2 diff --git a/arch/parisc/include/asm/agp.h b/arch/parisc/include/asm/agp.h index cb04470e63d0..14ae54cfd368 100644 --- a/arch/parisc/include/asm/agp.h +++ b/arch/parisc/include/asm/agp.h @@ -8,8 +8,8 @@ * */ -#define map_page_into_agp(page) /* nothing */ -#define unmap_page_from_agp(page) /* nothing */ +#define map_page_into_agp(page) do { } while (0) +#define unmap_page_from_agp(page) do { } while (0) #define flush_agp_cache() mb() /* GATT allocation. Returns/accepts GATT kernel virtual address. */ diff --git a/arch/powerpc/include/asm/agp.h b/arch/powerpc/include/asm/agp.h index b29b1186f819..6b6485c988dd 100644 --- a/arch/powerpc/include/asm/agp.h +++ b/arch/powerpc/include/asm/agp.h @@ -5,8 +5,8 @@ #include -#define map_page_into_agp(page) -#define unmap_page_from_agp(page) +#define map_page_into_agp(page) do {} while (0) +#define unmap_page_from_agp(page) do {} while (0) #define flush_agp_cache() mb() /* GATT allocation. Returns/accepts GATT kernel virtual address. */ diff --git a/arch/sparc/include/asm/agp.h b/arch/sparc/include/asm/agp.h index efe0d6a12e5a..2d0ff84cee3f 100644 --- a/arch/sparc/include/asm/agp.h +++ b/arch/sparc/include/asm/agp.h @@ -4,9 +4,9 @@ /* dummy for now */ -#define map_page_into_agp(page) -#define unmap_page_from_agp(page) -#define flush_agp_cache() mb() +#define map_page_into_agp(page) do { } while (0) +#define unmap_page_from_agp(page) do { } while (0) +#define flush_agp_cache() mb() /* GATT allocation. Returns/accepts GATT kernel virtual address. */ #define alloc_gatt_pages(order) \