From: Andrew Morton <akpm@linux-foundation.org>
To: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Jens Axboe <axboe@kernel.dk>,
Russell King - ARM Linux <linux@arm.linux.org.uk>,
Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
linux-kernel@vger.kernel.org, linux-media@vger.kernel.org
Subject: Re: [RFC PATCH v2] lib: scatterlist: add sg splitting function
Date: Tue, 4 Aug 2015 14:24:03 -0700 [thread overview]
Message-ID: <20150804142403.ce26115ca8da96135e8973f5@linux-foundation.org> (raw)
In-Reply-To: <878u9rm1cr.fsf@belgarion.home>
On Tue, 04 Aug 2015 19:04:36 +0200 Robert Jarzmik <robert.jarzmik@free.fr> wrote:
> Andrew Morton <akpm@linux-foundation.org> writes:
>
> >> include/linux/scatterlist.h | 5 ++
> >> lib/scatterlist.c | 189 ++++++++++++++++++++++++++++++++++++++++++++
> >> 2 files changed, 194 insertions(+)
> >
> > It's quite a bit of code for a fairly specialised thing. How ugly
> > would it be to put this in a new .c file and have subsystems select it
> > in Kconfig?
> I have no idea about the "ugliness", but why not ...
>
> If nobody objects, and in order to submit a proper patch, there are decisions to
> make :
> - what will be the scope of this new .c file ?
> - only sg_plit() ?
> - all sg specialized functions, ie. sg_lib.c ?
Just sg_split I'd say. It's a logical unit. Other things can be moved
elsewhere later as cleanups/optimisations, but that's all off-topic.
> - will include/linux/scatterlist.h have an "ifdefed" portion for what X.c
> offers ?
I prefer to avoid the ifdefs. This means that the error is reported at
link-time rather than compile-time but that's a pretty small cost and
it's a once-off inconvenience, whereas messy/complex header files are
permanent.
> - what naming for X.c and the config entry ?
um, CONFIG_SG_SPLIT and sg_split.c?
> What about adding this to lib/Makefile, and one ifdef to scatterlist.h ? :
> obj-$(CONFIG_SG_LIB) += sg_lib.o
It would be obj-$(CONFIG_SG_SPLIT) += sg_split.o
prev parent reply other threads:[~2015-08-04 21:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-01 13:17 Robert Jarzmik
2015-08-03 23:19 ` Andrew Morton
2015-08-04 17:04 ` Robert Jarzmik
2015-08-04 21:24 ` Andrew Morton [this message]
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=20150804142403.ce26115ca8da96135e8973f5@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=g.liakhovetski@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mchehab@osg.samsung.com \
--cc=robert.jarzmik@free.fr \
/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
all inboxes | Powered by JetHome®