[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131026113221.GB1792@Nokia-N900>
Date: Sat, 26 Oct 2013 13:32:21 +0200
From: Pavel Machek <pavel@....cz>
To: Tejun Heo <tj@...nel.org>
Cc: gregkh@...uxfoundation.org, kay@...y.org,
linux-kernel@...r.kernel.org, ebiederm@...ssion.com,
bhelgaas@...gle.com
Subject: Re: [PATCH 14/34] sysfs, kernfs: prepare read path for kernfs
Hi!
> We're in the process of separating out core sysfs functionality into
> kernfs which will deal with sysfs_dirents directly. This patch
> rearranges read path so that the kernfs and sysfs parts are separate.
> +static int sysfs_kf_seq_show(struct seq_file *sf, void *v)
> {
> struct sysfs_open_file *of = sf->private;
> struct kobject *kobj = of->sd->s_parent->priv;
> - const struct sysfs_ops *ops;
> + const struct sysfs_ops *ops = sysfs_file_ops(of->sd);
> + ssize_t count = 0;
> char *buf;
> - ssize_t count;
>
> /* acquire buffer and ensure that it's >= PAGE_SIZE */
> count = seq_get_buf(sf, &buf);
Initing count to zero is superfluous here.
> + /* the same behavior as single_open() */
> + return NULL + !*ppos;
> +}
That's certainly interesting code.
Pavel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists