From e609d55773ef84216978141f7088ecce2931b7fd Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Mon, 20 Jul 2009 09:47:36 +0000 Subject: [PATCH] When compiling a 2.6.30 or 2.6.30.1 kernel with the scst_exec_req_fifo-2.6.30.patch applied, the following warning is printed many times by the compiler: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit include/linux/scatterlist.h:223: warning: ‘enum km_type’ declared inside parameter list include/linux/scatterlist.h:223: warning: its scope is only this definition or declaration, which is probably not what you want include/linux/scatterlist.h:226: warning: ‘enum km_type’ declared inside parameter list The patch below fixes these compiler warnings by adding a forward declaration for "enum km_type" in include/linux/scatterlist.h. Signed-off-by: Bart Van Assche git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@963 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/kernel/scst_exec_req_fifo-2.6.30.patch | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scst/kernel/scst_exec_req_fifo-2.6.30.patch b/scst/kernel/scst_exec_req_fifo-2.6.30.patch index 8d1b1082f..f3202542d 100644 --- a/scst/kernel/scst_exec_req_fifo-2.6.30.patch +++ b/scst/kernel/scst_exec_req_fifo-2.6.30.patch @@ -640,10 +640,12 @@ diff -upkr linux-2.6.30.1/include/linux/blkdev.h linux-2.6.30.1/include/linux/bl diff -upkr linux-2.6.30.1/include/linux/scatterlist.h linux-2.6.30.1/include/linux/scatterlist.h --- linux-2.6.30.1/include/linux/scatterlist.h 2009-06-10 07:05:27.000000000 +0400 +++ linux-2.6.30.1/include/linux/scatterlist.h 2009-07-13 13:56:24.000000000 +0400 -@@ -218,6 +218,13 @@ size_t sg_copy_from_buffer(struct scatte +@@ -218,6 +218,15 @@ size_t sg_copy_from_buffer(struct scatte size_t sg_copy_to_buffer(struct scatterlist *sgl, unsigned int nents, void *buf, size_t buflen); ++enum km_type; ++ +int sg_copy_elem(struct scatterlist *dst_sg, struct scatterlist *src_sg, + size_t copy_len, enum km_type d_km_type, + enum km_type s_km_type);