[PATCH] Staging: dgnc: Clean up Macros

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix checkpatch warning: Macros with flow control statements should be avoided

Because Macros with flow control statements (goto and return) are
not very nice to read as any flow movement is unexpected.

Signed-off-by: Siddhi Dave <d.sandy5990@xxxxxxxxx>
---
 drivers/staging/dgnc/dgnc_sysfs.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/dgnc/dgnc_sysfs.c b/drivers/staging/dgnc/dgnc_sysfs.c
index 290bf6e..0767740 100644
--- a/drivers/staging/dgnc/dgnc_sysfs.c
+++ b/drivers/staging/dgnc/dgnc_sysfs.c
@@ -90,16 +90,16 @@ void dgnc_remove_driver_sysfiles(struct pci_driver *dgnc_driver)
 	driver_remove_file(driverfs, &driver_attr_pollrate);
 }
 
-#define DGNC_VERIFY_BOARD(p, bd)				\
-	do {							\
-		if (!p)						\
-			return 0;				\
-								\
-		bd = dev_get_drvdata(p);			\
-		if (!bd || bd->magic != DGNC_BOARD_MAGIC)	\
-			return 0;				\
-		if (bd->state != BOARD_READY)			\
-			return 0;				\
+#define DGNC_VERIFY_BOARD(p, bd)
+do {
+	if (!p)
+		return 0;
+
+		bd = dev_get_drvdata(p);
+		if (!bd || bd->magic != DGNC_BOARD_MAGIC)
+			return 0;
+		if (bd->state != BOARD_READY)
+			return 0;
 	} while (0)
 
 static ssize_t vpd_show(struct device *p, struct device_attribute *attr,
-- 
2.7.4

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux