[PATCH 13/16] char: agp: generic: Place braces around optimised out function in if()
From: Lee Jones
Date: Thu May 20 2021 - 08:51:17 EST
Fixes the following W=1 kernel build warning(s):
drivers/char/agp/generic.c: In function ‘agp_generic_destroy_page’:
drivers/char/agp/generic.c:1265:28: warning: suggest braces around empty body in an ‘if’ statement [-Wempty-body]
Cc: David Airlie <airlied@xxxxxxxx>
Signed-off-by: Lee Jones <lee.jones@xxxxxxxxxx>
---
drivers/char/agp/generic.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c
index 3ffbb1c80c5c7..37a07676da6ff 100644
--- a/drivers/char/agp/generic.c
+++ b/drivers/char/agp/generic.c
@@ -1261,8 +1261,9 @@ void agp_generic_destroy_page(struct page *page, int flags)
if (page == NULL)
return;
- if (flags & AGP_PAGE_DESTROY_UNMAP)
+ if (flags & AGP_PAGE_DESTROY_UNMAP) {
unmap_page_from_agp(page);
+ }
if (flags & AGP_PAGE_DESTROY_FREE) {
put_page(page);
--
2.31.1