[Devel] [PATCH RHEL7 COMMIT] bc: add struct seq_file declaration - fix virtinfo.h compile warning

Konstantin Khorenko khorenko at odin.com
Thu May 7 09:28:05 PDT 2015


The commit is pushed to "branch-rh7-3.10.0-123.1.2-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-123.1.2.vz7.4.10
------>
commit c359f8c3a9ce430c5473cf340fe53f4dc8017012
Author: Kir Kolyshkin <kir at openvz.org>
Date:   Thu May 7 20:28:05 2015 +0400

    bc: add struct seq_file declaration - fix virtinfo.h compile warning
    
    This was found while tring to compile the kernel with a stock
    config (i.e. no CONFIG_BEANCOUNTERS, CONFIG_VE etc.) and
    boot it on IBM Power8.
    
    =============================================================
    
    Fix the following compilation warning:
    
    C      kernel/bc/sys.o
    In file included from kernel/bc/sys.c:11:0:
    include/linux/virtinfo.h:60:10: warning: ‘struct seq_file’ declared
    inside parameter list [enabled by default]
       struct user_beancounter *ub, unsigned long meminfo_val);
              ^
    include/linux/virtinfo.h:60:10: warning: its scope is only this
    definition or declaration, which is probably not what you want [enabled
    by default]
    
    The fix it forward definition of struct seq_file.
    
    Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
 include/linux/virtinfo.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/linux/virtinfo.h b/include/linux/virtinfo.h
index e8cb94c..1730aca 100644
--- a/include/linux/virtinfo.h
+++ b/include/linux/virtinfo.h
@@ -56,6 +56,8 @@ struct meminfo {
 	unsigned long slab_reclaimable, slab_unreclaimable;
 };
 
+struct seq_file;
+
 int meminfo_proc_show_ub(struct seq_file *m, void *v,
 		struct user_beancounter *ub, unsigned long meminfo_val);
 



More information about the Devel mailing list