Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

zram: consolidate device-attr declarations

Do not spread device attributes declarations across the file, move
io_stat, mm_stat, debug_stat to a common device-attr section.

Link: https://lkml.kernel.org/r/20251201094754.4149975-8-senozhatsky@chromium.org
Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Brian Geffon <bgeffon@google.com>
Cc: David Stevens <stevensd@google.com>
Cc: Minchan Kim <minchan@google.com>
Cc: Richard Chang <richardycc@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Sergey Senozhatsky and committed by
Andrew Morton
0327a862 0d38260c

+3 -4
+3 -4
drivers/block/zram/zram_drv.c
··· 1966 1966 return ret; 1967 1967 } 1968 1968 1969 - static DEVICE_ATTR_RO(io_stat); 1970 - static DEVICE_ATTR_RO(mm_stat); 1971 - static DEVICE_ATTR_RO(debug_stat); 1972 - 1973 1969 static void zram_meta_free(struct zram *zram, u64 disksize) 1974 1970 { 1975 1971 size_t num_pages = disksize >> PAGE_SHIFT; ··· 3004 3008 .owner = THIS_MODULE 3005 3009 }; 3006 3010 3011 + static DEVICE_ATTR_RO(io_stat); 3012 + static DEVICE_ATTR_RO(mm_stat); 3013 + static DEVICE_ATTR_RO(debug_stat); 3007 3014 static DEVICE_ATTR_WO(compact); 3008 3015 static DEVICE_ATTR_RW(disksize); 3009 3016 static DEVICE_ATTR_RO(initstate);