[PATCH 1/3] fix conditional context test case with void

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The test file for context checking contains a few test cases
with a conditional, mimicking kernels's __cond_lock().
But the macro involved use as condition the return value of
a function, _ca(), which itself returns void ...

Fix the test by giving _ca() a return type of 'int'.

CC: Josh Triplett <josh@xxxxxxxxxxxxxxxx>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
---
 validation/context.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/validation/context.c b/validation/context.c
index 33b70b84b..b9500dc75 100644
--- a/validation/context.c
+++ b/validation/context.c
@@ -10,7 +10,7 @@ static void r(void) __attribute__((context(1,0)))
 	__context__(-1);
 }
 
-extern void _ca(int fail);
+extern int _ca(int fail);
 #define ca(fail) __cond_lock(_ca(fail))
 
 static void good_paired1(void)
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux