Changeset View
Changeset View
Standalone View
Standalone View
sys/compat/linuxkpi/common/include/linux/device.h
Show First 20 Lines • Show All 548 Lines • ▼ Show 20 Lines | |||||
static inline void | static inline void | ||||
class_remove_file(struct class *class, const struct class_attribute *attr) | class_remove_file(struct class *class, const struct class_attribute *attr) | ||||
{ | { | ||||
if (class) | if (class) | ||||
sysfs_remove_file(&class->kobj, &attr->attr); | sysfs_remove_file(&class->kobj, &attr->attr); | ||||
} | } | ||||
static inline int | #define dev_to_node(dev) linux_dev_to_node(dev) | ||||
dev_to_node(struct device *dev) | #define of_node_to_nid(node) -1 | ||||
{ | int linux_dev_to_node(struct device *); | ||||
markj: Why is it variadic? | |||||
Done Inline ActionsJust to get a better compile error, if the argument passed is bad. hselasky: Just to get a better compile error, if the argument passed is bad.
Do you think I should change… | |||||
Done Inline ActionsI think there should at least be a comment explaining it, otherwise it looks strange. And, why is it especially likely to get compile errors with this function? markj: I think there should at least be a comment explaining it, otherwise it looks strange. And, why… | |||||
Done Inline ActionsOK, I'll fix. hselasky: OK, I'll fix. | |||||
return -1; | |||||
} | |||||
char *kvasprintf(gfp_t, const char *, va_list); | char *kvasprintf(gfp_t, const char *, va_list); | ||||
char *kasprintf(gfp_t, const char *, ...); | char *kasprintf(gfp_t, const char *, ...); | ||||
char *lkpi_devm_kasprintf(struct device *, gfp_t, const char *, ...); | char *lkpi_devm_kasprintf(struct device *, gfp_t, const char *, ...); | ||||
#define devm_kasprintf(_dev, _gfp, _fmt, ...) \ | #define devm_kasprintf(_dev, _gfp, _fmt, ...) \ | ||||
lkpi_devm_kasprintf(_dev, _gfp, _fmt, ##__VA_ARGS__) | lkpi_devm_kasprintf(_dev, _gfp, _fmt, ##__VA_ARGS__) | ||||
Show All 39 Lines |
Why is it variadic?