From: "Michał Nazarewicz" <m.nazarewicz@samsung.com>
To: Greg KH <greg@kroah.com>
Cc: linux-arm-kernel@lists.infradead.org,
FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
Daniel Walker <dwalker@codeaurora.org>,
Russell King <linux@arm.linux.org.uk>,
Jonathan Corbet <corbet@lwn.net>,
Peter Zijlstra <peterz@infradead.org>,
Pawel Osciak <p.osciak@samsung.com>,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
linux-kernel@vger.kernel.org, Hans Verkuil <hverkuil@xs4all.nl>,
Mel Gorman <mel@csn.ul.ie>,
Kyungmin Park <kyungmin.park@samsung.com>,
Zach Pfeffer <zpfeffer@codeaurora.org>,
Minchan Kim <minchan.kim@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-media@vger.kernel.org, linux-mm@kvack.org,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Marek Szyprowski <m.szyprowski@samsung.com>
Subject: Re: [RFCv5 3/9] mm: cma: Added SysFS support
Date: Tue, 07 Sep 2010 08:55:12 +0200 [thread overview]
Message-ID: <op.vinhiabu7p4s8u@localhost> (raw)
In-Reply-To: <20100907060818.GA2609@kroah.com>
> On Tue, Sep 07, 2010 at 07:31:30AM +0200, Micha?? Nazarewicz wrote:
>> Thanks for reviewing the sysfs part. Actually, I was never really sure
>> if I shouldn't rather put this code to debugfs and you got me convinced
>> that I should. Sysfs somehow looked more appealing from kernel's API
>> point of view -- things seem to be more organised in sysfs than in
>> debugfs. It seems I'll have to port it to debugfs after all
On Tue, 07 Sep 2010 08:08:18 +0200, Greg KH <greg@kroah.com> wrote:
> Yes, debugfs looks like a much better place for this.
I'll fix that in v6 then.
>>>> +static ssize_t cma_sysfs_region_name_show(struct cma_region *reg, char *page)
>>>> +{
>>>> + return reg->name ? snprintf(page, PAGE_SIZE, "%s\n", reg->name) : 0;
>>>> +}
>>> Is a name field ever really going to be bigger than a page?
>> For numeric values you are right that snprintf() is a bit paranoid,
>> still I see no good reason why not to use it.
> Same goes for no good reason to use it :)
I somehow prefer to always use "safe" versions of the string manipulation
functions -- it's better to use it everywhere then to forget it in one
place. Call to sprintf() is translated to vsnprintf() anyway so there's
no performance gain.
--
Best regards, _ _
| Humble Liege of Serenely Enlightened Majesty of o' \,=./ `o
| Computer Science, Michał "mina86" Nazarewicz (o o)
+----[mina86*mina86.com]---[mina86*jabber.org]----ooO--(_)--Ooo--
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2010-09-07 6:56 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-06 6:33 [RFCv5 0/9] CMA + VCMM integration Michal Nazarewicz
2010-09-06 6:33 ` [RFCv5 1/9] lib: rbtree: rb_root_init() function added Michal Nazarewicz
2010-09-06 6:33 ` [RFCv5 2/9] mm: cma: Contiguous Memory Allocator added Michal Nazarewicz
2010-09-06 6:33 ` [RFCv5 3/9] mm: cma: Added SysFS support Michal Nazarewicz
2010-09-06 21:07 ` Greg KH
2010-09-07 5:31 ` Michał Nazarewicz
2010-09-07 6:08 ` Greg KH
2010-09-07 6:55 ` Michał Nazarewicz [this message]
2010-09-06 6:33 ` [RFCv5 4/9] mm: cma: Added command line parameters support Michal Nazarewicz
2010-09-06 6:33 ` [RFCv5 5/9] mm: cma: Test device and application added Michal Nazarewicz
2010-09-06 6:33 ` [RFCv5 6/9] ARM: cma: Added CMA to Aquila, Goni and c210 universal boards Michal Nazarewicz
2010-09-06 6:33 ` [RFCv5 7/9] mm: vcm: Virtual Contiguous Memory framework added Michal Nazarewicz
2010-09-21 16:13 ` Konrad Rzeszutek Wilk
2010-09-06 6:33 ` [RFCv5 8/9] mm: vcm: Sample driver added Michal Nazarewicz
2010-09-06 21:10 ` Greg KH
2010-09-07 1:58 ` Michał Nazarewicz
2010-09-06 6:33 ` [RFCv5 9/9] mm: vcm: vcm-cma: VCM CMA " Michal Nazarewicz
2010-09-06 21:09 ` [RFCv5 0/9] CMA + VCMM integration Greg KH
2010-09-07 1:40 ` Michał Nazarewicz
2010-09-07 2:34 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=op.vinhiabu7p4s8u@localhost \
--to=m.nazarewicz@samsung.com \
--cc=akpm@linux-foundation.org \
--cc=corbet@lwn.net \
--cc=dwalker@codeaurora.org \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=greg@kroah.com \
--cc=hverkuil@xs4all.nl \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=konrad.wilk@oracle.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux@arm.linux.org.uk \
--cc=m.szyprowski@samsung.com \
--cc=mel@csn.ul.ie \
--cc=minchan.kim@gmail.com \
--cc=p.osciak@samsung.com \
--cc=peterz@infradead.org \
--cc=zpfeffer@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox