]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
zram: cosmetic ZRAM_ATTR_RO code formatting tweak
authorSergey Senozhatsky <sergey.senozhatsky@gmail.com>
Tue, 7 Apr 2015 23:44:43 +0000 (09:44 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 7 Apr 2015 23:44:43 +0000 (09:44 +1000)
We currently don't support zram on-demand device creation.  The only way
to have N zram devices is to specify num_devices module parameter (default
value 1).  That means that if, for some reason, at some point, user wants
to have N + 1 devies he/she must umount all the existing devices, unload
the module, load the module passing num_devices equals to N + 1.  And do
this again, if needed.

This patchset introduces zram-control sysfs class, which has two sysfs
attrs:

 - zram_add     -- add a new specific (device_id) zram device
 - zram_remove  -- remove a specific (device_id) zram device

    Usage example:
        # add a new specific zram device
        echo 4 > /sys/class/zram-control/zram_add

        # remove a specific zram device
        echo 4 > /sys/class/zram-control/zram_remove

The patchset also does some cleanups and huge code reorganization.

This patch (of 8):

Fix a misplaced backslash.

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/block/zram/zram_drv.c

index 871bd3550cb0e0842296771412e749225542ffac..8fc25660cef50b9048b2a4feef6183af043b49be 100644 (file)
@@ -44,7 +44,7 @@ static const char *default_compressor = "lzo";
 static unsigned int num_devices = 1;
 
 #define ZRAM_ATTR_RO(name)                                             \
-static ssize_t name##_show(struct device *d,           \
+static ssize_t name##_show(struct device *d,                           \
                                struct device_attribute *attr, char *b) \
 {                                                                      \
        struct zram *zram = dev_to_zram(d);                             \