Skip to contentSkip to conversation

seq_file: Introduce DEFINE_SEQ_ATTRIBUTE() helper macro

PATCH Markus Elfring 1 participant 1 message May 9, 2020 Kernel janitors

lore
Share & tools
lore
#0 lore raw

…

Review void *__seq_open_private(struct file *, const struct seq_operations *, int); · line 149

Quoted 7 lines

+++ b/include/linux/seq_file.h

(quoted diff) +2 -0
@@ -145,6 +145,25 @@ void *__seq_open_private(struct file *, const struct seq_operations *, int);
 int seq_open_private(struct file *, const struct seq_operations *, int);
 int seq_release_private(struct inode *, struct file *);
 
+#define DEFINE_SEQ_ATTRIBUTE(__name)					\
+static int __name ## _open(struct inode *inode, struct file *file)	\

…

Can such a macro work also with an identifier which does not contain double underscores?

Regards,
Markus