[Devel] [PATCH RHEL7 COMMIT] bc: for_each_beancounter() definition for !CONFIG_BEANCOUNTERS

Konstantin Khorenko khorenko at odin.com
Thu May 7 09:28:03 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 365d79b17bf873ed18868bcb2d878dfa2d0fe72d
Author: Kir Kolyshkin <kir at openvz.org>
Date:   Thu May 7 20:27:58 2015 +0400

    bc: for_each_beancounter() definition for !CONFIG_BEANCOUNTERS
    
    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.
    
    =============================================================
    
    Add for_each_beancounter() definition for !CONFIG_BEANCOUNTERS case,
    fixing the following compilation problem:
    
      CC      drivers/tty/sysrq.o
    drivers/tty/sysrq.c: In function ‘sysrq_handle_showmem’:
    drivers/tty/sysrq.c:320:2: error: implicit declaration of function
    ‘for_each_beancounter’ [-Werror=implicit-function-declaration]
      for_each_beancounter(ub)
      ^
    drivers/tty/sysrq.c:321:3: error: expected ‘;’ before ‘show_ub_mem’
       show_ub_mem(ub);
       ^
    cc1: some warnings being treated as errors
    
    Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
 include/bc/beancounter.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/bc/beancounter.h b/include/bc/beancounter.h
index faf0197..4889c3f 100644
--- a/include/bc/beancounter.h
+++ b/include/bc/beancounter.h
@@ -252,6 +252,8 @@ static inline unsigned long ub_resource_excess(struct user_beancounter *ub,
 
 #define mm_ub(mm)	(NULL)
 
+#define for_each_beancounter(__ubp)	while (0)
+
 extern inline struct user_beancounter *get_beancounter_by_name
 		(const char *name, int create) { return NULL; }
 extern inline struct user_beancounter *get_beancounter_byuid



More information about the Devel mailing list