lib/scatterlist: make ARCH_HAS_SG_CHAIN an actual Kconfig
Rather than have architectures #define ARCH_HAS_SG_CHAIN in an architecture specific scatterlist.h, make it a proper Kconfig option and use that instead. At same time, remove the header files are are now mostly useless and just include asm-generic/scatterlist.h. [sfr@canb.auug.org.au: powerpc files now need asm/dma.h] Signed-off-by: Laura Abbott <lauraa@codeaurora.org> Acked-by: Thomas Gleixner <tglx@linutronix.de> [x86] Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> [powerpc] Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: Tony Luck <tony.luck@intel.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: "James E.J. Bottomley" <JBottomley@parallels.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
2f137d66fb
commit
308c09f17d
@@ -508,4 +508,11 @@ config UCS2_STRING
|
||||
|
||||
source "lib/fonts/Kconfig"
|
||||
|
||||
#
|
||||
# sg chaining option
|
||||
#
|
||||
|
||||
config ARCH_HAS_SG_CHAIN
|
||||
def_bool n
|
||||
|
||||
endmenu
|
||||
|
@@ -73,7 +73,7 @@ EXPORT_SYMBOL(sg_nents);
|
||||
**/
|
||||
struct scatterlist *sg_last(struct scatterlist *sgl, unsigned int nents)
|
||||
{
|
||||
#ifndef ARCH_HAS_SG_CHAIN
|
||||
#ifndef CONFIG_ARCH_HAS_SG_CHAIN
|
||||
struct scatterlist *ret = &sgl[nents - 1];
|
||||
#else
|
||||
struct scatterlist *sg, *ret = NULL;
|
||||
@@ -255,7 +255,7 @@ int __sg_alloc_table(struct sg_table *table, unsigned int nents,
|
||||
|
||||
if (nents == 0)
|
||||
return -EINVAL;
|
||||
#ifndef ARCH_HAS_SG_CHAIN
|
||||
#ifndef CONFIG_ARCH_HAS_SG_CHAIN
|
||||
if (WARN_ON_ONCE(nents > max_ents))
|
||||
return -EINVAL;
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user