Re: [PATCH] block: zram: replace scnprintf() with sysfs_emit() in *_show() functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On (25/06/27 09:22), Rahul Kumar wrote:
[..]
>  static void reset_bdev(struct zram *zram)
> @@ -1292,7 +1292,7 @@ static ssize_t recomp_algorithm_show(struct device *dev,
>  		if (!zram->comp_algs[prio])
>  			continue;
>  
> -		sz += scnprintf(buf + sz, PAGE_SIZE - sz - 2, "#%d: ", prio);
> +		sz += sysfs_emit_at(buf, sz, "#%d: ", prio);
>  		sz += __comp_algorithm_show(zram, prio, buf + sz);

Actually, there is a tiny bug in zcomp.  It's unrelated to this
patch, but I'll send a fix as followup, to avoid any conflicts.




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux