[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160818020637.GA500@swordfish>
Date: Thu, 18 Aug 2016 11:06:37 +0900
From: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
To: Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>
Cc: Fam Zheng <famz@...hat.com>, linux-kernel@...r.kernel.org,
linux-nvme@...ts.infradead.org,
Keith Busch <keith.busch@...el.com>,
Michael Ellerman <mpe@...erman.id.au>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
linuxppc-dev@...ts.ozlabs.org,
"Michael S. Tsirkin" <mst@...hat.com>, linux-block@...r.kernel.org,
Brian Norris <computersforpeace@...il.com>,
Paul Mackerras <paulus@...ba.org>,
linux-mtd@...ts.infradead.org, "Ed L. Cashin" <ed.cashin@....org>,
Jens Axboe <axboe@...nel.dk>, Minchan Kim <minchan@...nel.org>,
virtualization@...ts.linux-foundation.org,
Nitin Gupta <ngupta@...are.org>,
David Woodhouse <dwmw2@...radead.org>
Subject: Re: [PATCH 11/15] zram: Pass attribute group to device_add_disk
On (08/18/16 10:59), Sergey Senozhatsky wrote:
[..]
> I like the previous "Error creating sysfs group for device" string better,
> than "Error creating disk", because the latter one is much less informative.
>
> do you want to do something like below?
>
> int device_add_disk(struct device *parent, struct gendisk *disk,
> ...
> if (attr_group) {
> retval = sysfs_create_group(&disk_to_dev(disk)->kobj,
> attr_group);
>
> + pr_err("Error creating sysfs group for device ...\n", ...);
d'oh... a typo. pr_err() is meant to be in `if (retval)' branch.
> if (retval)
> goto fail;
> }
-ss
Powered by blists - more mailing lists