mm: simplify nodemask printing
[sfrench/cifs-2.6.git] / include / linux / nodemask.h
index de1c50b93c61534207e9da8345fe45cda27c0a5d..15cab3967d6dfe435be2bbbe63c83cf06ee7042a 100644 (file)
@@ -104,7 +104,9 @@ extern nodemask_t _unused_nodemask_arg_;
  *
  * Can be used to provide arguments for '%*pb[l]' when printing a nodemask.
  */
-#define nodemask_pr_args(maskp)                MAX_NUMNODES, (maskp)->bits
+#define nodemask_pr_args(maskp)                                \
+       ((maskp) != NULL) ? MAX_NUMNODES : 0,           \
+       ((maskp) != NULL) ? (maskp)->bits : NULL
 
 /*
  * The inline keyword gives the compiler room to decide to inline, or