Merge tag 'modules-for-v5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux

Pull module updates from Jessica Yu:
 "Only a small cleanup this time around: a trivial conversion of
  zero-length arrays to flexible arrays"

* tag 'modules-for-v5.7' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux:
  kernel: module: Replace zero-length array with flexible-array member
This commit is contained in:
Linus Torvalds
2020-04-09 12:52:34 -07:00

View File

@@ -1515,7 +1515,7 @@ struct module_sect_attr {
struct module_sect_attrs { struct module_sect_attrs {
struct attribute_group grp; struct attribute_group grp;
unsigned int nsections; unsigned int nsections;
struct module_sect_attr attrs[0]; struct module_sect_attr attrs[];
}; };
static ssize_t module_sect_show(struct module_attribute *mattr, static ssize_t module_sect_show(struct module_attribute *mattr,
@@ -1608,7 +1608,7 @@ static void remove_sect_attrs(struct module *mod)
struct module_notes_attrs { struct module_notes_attrs {
struct kobject *dir; struct kobject *dir;
unsigned int notes; unsigned int notes;
struct bin_attribute attrs[0]; struct bin_attribute attrs[];
}; };
static ssize_t module_notes_read(struct file *filp, struct kobject *kobj, static ssize_t module_notes_read(struct file *filp, struct kobject *kobj,