From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754284AbbHDRIR (ORCPT ); Tue, 4 Aug 2015 13:08:17 -0400 Received: from smtp04.smtpout.orange.fr ([80.12.242.126]:17616 "EHLO smtp.smtpout.orange.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754010AbbHDRIQ (ORCPT ); Tue, 4 Aug 2015 13:08:16 -0400 X-ME-Helo: belgarion X-ME-Auth: amFyem1pay5yb2JlcnRAb3JhbmdlLmZy X-ME-Date: Tue, 04 Aug 2015 19:08:15 +0200 X-ME-IP: 109.214.23.104 From: Robert Jarzmik To: Andrew Morton , Jens Axboe Cc: Russell King - ARM Linux , Guennadi Liakhovetski , Mauro Carvalho Chehab , linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Subject: Re: [RFC PATCH v2] lib: scatterlist: add sg splitting function References: <1438435033-7636-1-git-send-email-robert.jarzmik@free.fr> <20150803161939.2edd494eb64bc81ea8e91c16@linux-foundation.org> X-URL: http://belgarath.falguerolles.org/ Date: Tue, 04 Aug 2015 19:04:36 +0200 In-Reply-To: <20150803161939.2edd494eb64bc81ea8e91c16@linux-foundation.org> (Andrew Morton's message of "Mon, 3 Aug 2015 16:19:39 -0700") Message-ID: <878u9rm1cr.fsf@belgarion.home> User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Andrew Morton 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 ? - will include/linux/scatterlist.h have an "ifdefed" portion for what X.c offers ? - what naming for X.c and the config entry ? What about adding this to lib/Makefile, and one ifdef to scatterlist.h ? : obj-$(CONFIG_SG_LIB) += sg_lib.o Cheers. -- Robert