Skip to content

Commit ed1af26

Browse files
Alexey Dobriyanakpm00
authored andcommitted
drivers/char/mem.c: shrink character device's devlist[] array
Merge padding, shrinking "struct memdev" from 32 bytes to 24 bytes on 64-bit. Link: https://lkml.kernel.org/r/fe4d62ab-2427-4635-b9f4-467853fb63e3@p183 Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent 543cd4c commit ed1af26

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

drivers/char/mem.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -692,23 +692,23 @@ static const struct file_operations full_fops = {
692692

693693
static const struct memdev {
694694
const char *name;
695-
umode_t mode;
696695
const struct file_operations *fops;
697696
fmode_t fmode;
697+
umode_t mode;
698698
} devlist[] = {
699699
#ifdef CONFIG_DEVMEM
700-
[DEVMEM_MINOR] = { "mem", 0, &mem_fops, FMODE_UNSIGNED_OFFSET },
700+
[DEVMEM_MINOR] = { "mem", &mem_fops, FMODE_UNSIGNED_OFFSET, 0 },
701701
#endif
702-
[3] = { "null", 0666, &null_fops, FMODE_NOWAIT },
702+
[3] = { "null", &null_fops, FMODE_NOWAIT, 0666 },
703703
#ifdef CONFIG_DEVPORT
704-
[4] = { "port", 0, &port_fops, 0 },
704+
[4] = { "port", &port_fops, 0, 0 },
705705
#endif
706-
[5] = { "zero", 0666, &zero_fops, FMODE_NOWAIT },
707-
[7] = { "full", 0666, &full_fops, 0 },
708-
[8] = { "random", 0666, &random_fops, FMODE_NOWAIT },
709-
[9] = { "urandom", 0666, &urandom_fops, FMODE_NOWAIT },
706+
[5] = { "zero", &zero_fops, FMODE_NOWAIT, 0666 },
707+
[7] = { "full", &full_fops, 0, 0666 },
708+
[8] = { "random", &random_fops, FMODE_NOWAIT, 0666 },
709+
[9] = { "urandom", &urandom_fops, FMODE_NOWAIT, 0666 },
710710
#ifdef CONFIG_PRINTK
711-
[11] = { "kmsg", 0644, &kmsg_fops, 0 },
711+
[11] = { "kmsg", &kmsg_fops, 0, 0644 },
712712
#endif
713713
};
714714

0 commit comments

Comments
 (0)