Skip to content

Commit 5646e3c

Browse files
sergey-senozhatskykawasaki
authored andcommitted
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. Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
1 parent f216c16 commit 5646e3c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

drivers/block/zram/zram_drv.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1966,10 +1966,6 @@ static ssize_t debug_stat_show(struct device *dev,
19661966
return ret;
19671967
}
19681968

1969-
static DEVICE_ATTR_RO(io_stat);
1970-
static DEVICE_ATTR_RO(mm_stat);
1971-
static DEVICE_ATTR_RO(debug_stat);
1972-
19731969
static void zram_meta_free(struct zram *zram, u64 disksize)
19741970
{
19751971
size_t num_pages = disksize >> PAGE_SHIFT;
@@ -3008,6 +3004,9 @@ static const struct block_device_operations zram_devops = {
30083004
.owner = THIS_MODULE
30093005
};
30103006

3007+
static DEVICE_ATTR_RO(io_stat);
3008+
static DEVICE_ATTR_RO(mm_stat);
3009+
static DEVICE_ATTR_RO(debug_stat);
30113010
static DEVICE_ATTR_WO(compact);
30123011
static DEVICE_ATTR_RW(disksize);
30133012
static DEVICE_ATTR_RO(initstate);

0 commit comments

Comments
 (0)