[PATCH 8/9] dax: fix empty-body warnings in bus.c
Randy Dunlap
rdunlap at infradead.org
Sat Apr 18 20:41:10 CEST 2020
Fix gcc empty-body warning when -Wextra is used:
../drivers/dax/bus.c:93:27: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body]
../drivers/dax/bus.c:98:29: warning: suggest braces around empty body in an ‘else’ statement [-Wempty-body]
Signed-off-by: Randy Dunlap <rdunlap at infradead.org>
Cc: Dan Williams <dan.j.williams at intel.com>
Cc: Vishal Verma <vishal.l.verma at intel.com>
Cc: Dave Jiang <dave.jiang at intel.com>
Cc: linux-nvdimm at lists.01.org
Cc: Linus Torvalds <torvalds at linux-foundation.org>
Cc: Andrew Morton <akpm at linux-foundation.org>
---
drivers/dax/bus.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- linux-next-20200417.orig/drivers/dax/bus.c
+++ linux-next-20200417/drivers/dax/bus.c
@@ -2,6 +2,7 @@
/* Copyright(c) 2017-2018 Intel Corporation. All rights reserved. */
#include <linux/memremap.h>
#include <linux/device.h>
+#include <linux/kernel.h>
#include <linux/mutex.h>
#include <linux/list.h>
#include <linux/slab.h>
@@ -90,12 +91,12 @@ static ssize_t do_id_store(struct device
} else
rc = -ENOMEM;
} else
- /* nothing to remove */;
+ do_empty(); /* nothing to remove */
} else if (action == ID_REMOVE) {
list_del(&dax_id->list);
kfree(dax_id);
} else
- /* dax_id already added */;
+ do_empty(); /* dax_id already added */
mutex_unlock(&dax_bus_lock);
if (rc < 0)
More information about the Alsa-devel
mailing list