Re: Linux 2.6.32.43
From: Jiri Slaby
Date: Wed Jul 13 2011 - 17:28:43 EST
Cced Joe.
On 07/13/2011 11:21 PM, Jiri Slaby wrote:
> On 07/13/2011 11:16 PM, Jiri Slaby wrote:
>> On 07/13/2011 05:45 AM, Greg KH wrote:
>>> Joe Perches (2):
>>> bug.h: Add WARN_RATELIMIT
>>> net: filter: Use WARN_RATELIMIT
>>
>> Hi, this causes a build failure on PPC with minimalistic config (PS3) [1]:
>> net/core/filter.c: In function 'sk_run_filter':
>> net/core/filter.c:297: error: implicit declaration of function
>> 'WARN_RATELIMIT'
>>
>> net/core/filter.c should include linux/bug.h (or linux/kernel.h).
>
> Ah, no, PS3 doesn't have CONFIG_BUG set.
A fix attached. Upstream doesn't need it. There it is all in
linux/ratelimit.h
>> [1]
>> http://gitorious.org/opensuse/kernel-source/blobs/SLE11-SP1/config/ppc/ps3
>>
>> regards,
--
js
suse labs
From: Jiri Slaby <jslaby@xxxxxxx>
Subject: PPC: fix net core build
Patch-mainline: not yet
After "net: filter: Use WARN_RATELIMIT" was applied as a part of
patches.kernel.org/patch-2.6.32.42-43 we are choking at:
net/core/filter.c: In function 'sk_run_filter':
net/core/filter.c:297: error: implicit declaration of function 'WARN_RATELIMIT'
on configs without CONFIG_BUG.
Signed-off-by: Jiri Slaby <jslaby@xxxxxxx>
---
include/asm-generic/bug.h | 7 +++++++
1 file changed, 7 insertions(+)
--- a/include/asm-generic/bug.h
+++ b/include/asm-generic/bug.h
@@ -126,6 +126,13 @@ extern void warn_slowpath_null(const cha
})
#endif
+#ifndef WARN_RATELIMIT
+#define WARN_RATELIMIT(condition, format...) ({ \
+ int __ret_warn_on = !!(condition); \
+ unlikely(__ret_warn_on); \
+})
+#endif
+
#endif
#define WARN_ON_ONCE(condition) ({ \