Skip to contentSkip to conversation

iomap: simplify header file include guard macro definition

PATCH In review Shan Hai 3 participants 4 messages Jul 16, 2018 – Jul 17, 2018

Subsystems (2)
lore
Share & tools
lore

Shan Hai

author
#0 lore raw

PATCH 1/1 iomap: simplify header file include guard macro definition

The simple definition of a macro is enough for the include guard, it's not necessary to assign a value to it, so remove the assignment.

---
 include/linux/iomap.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/iomap.h +1 -1
index a044a82..25aa7d8 100644
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0 */
 #ifndef LINUX_IOMAP_H
-#define LINUX_IOMAP_H 1
+#define LINUX_IOMAP_H
 
 #include <linux/types.h>
 
Signature · 1 line
2.7.4
#1 lore raw
Quoted 4 lines · Shan Hai

The simple definition of a macro is enough for the include guard, it's not necessary to assign a value to it, so remove the assignment.

And what is the exact benefit of changing this?

#2 lore raw
Quoted 7 lines · Christoph Hellwig
Quoted 4 lines · Shan Hai

The simple definition of a macro is enough for the include guard, it's not necessary to assign a value to it, so remove the assignment.

And what is the exact benefit of changing this?

doesn't seem worthwhile to me either. If anything's going to change, it should probably be _LINUX_IOMAP_H (insofaras we have a standard for include guards, a single _ seems to be preferred)

author
#3 lore raw
In reply to Christoph Hellwig
Quoted 6 lines · Christoph Hellwig
Quoted 4 lines · Shan Hai

The simple definition of a macro is enough for the include guard, it's not necessary to assign a value to it, so remove the assignment.

And what is the exact benefit of changing this?

The guard macro definition looks consistent with others, that's all :)

Thanks
Shan Hai