[PATCH 1/1] Lustre: single statement macros should not use do {} while (0)

Mario J. Rugiero mrugiero at gmail.com
Wed Feb 18 20:37:55 UTC 2015


This fixes all appearances of the warning but one, as that one seems to 
be intentional:

WARNING: Single statement macros should not use a do {} while (0) loop
#1221: FILE: lustre/include/lustre_dlm.h:1221:
+#define LDLM_LOCK_RELEASE(lock)		 \
+do {					    \
+	/*LDLM_DEBUG((lock), "put");*/	  \
+	ldlm_lock_put(lock);		    \
+} while (0)

I didn't know if I should touch this debug statement, and if uncommented 
it would certainly be incorrect to erase the do-while construct.

Regards,
Mario.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Lustre-single-statement-macros-should-not-use-a-do-w.patch
Type: text/x-patch
Size: 8978 bytes
Desc: not available
URL: <http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/attachments/20150218/38dd147f/attachment.bin>


More information about the devel mailing list