* [next:akpm 86/86] drivers/block/drbd/drbd_int.h:50:10: sparse: preprocessor token __must_hold redefi
@ 2012-10-12 16:41 Fengguang Wu
2012-10-12 19:10 ` [next:akpm 86/86] drivers/block/drbd/drbd_int.h:50:10: sparse: preprocessor token __must_hold re Josh Triplett
0 siblings, 1 reply; 2+ messages in thread
From: Fengguang Wu @ 2012-10-12 16:41 UTC (permalink / raw)
To: kernel-janitors
Hi Josh,
FYI, there are new sparse warnings show up in
tree: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git akpm
head: 04b956faad392f46c9a234962a9990196b8e48fc
commit: 04b956faad392f46c9a234962a9990196b8e48fc [86/86] linux/compiler.h: add __must_hold macro for functions called with a lock held
+ drivers/block/drbd/drbd_int.h:50:10: sparse: preprocessor token __must_hold redefined
include/linux/compiler.h:13:10: this was the original definition
drivers/block/drbd/drbd_int.h:977:39: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1283:69: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1284:70: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1285:59: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1286:60: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1287:63: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1288:65: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1289:66: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1469:74: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1470:50: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1471:51: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1472:54: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1473:62: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1558:92: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1631:61: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_bitmap.c:955:75: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_bitmap.c:1008:100: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_bitmap.c:1124:42: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_bitmap.c:1135:43: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_bitmap.c:1146:47: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_bitmap.c:1156:68: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_bitmap.c:1172:54: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_bitmap.c:1190:66: sparse: attribute 'require_context': unknown attribute
--
+ drivers/block/drbd/drbd_int.h:50:10: sparse: preprocessor token __must_hold redefined
include/linux/compiler.h:13:10: this was the original definition
drivers/block/drbd/drbd_int.h:977:39: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1283:69: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1284:70: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1285:59: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1286:60: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1287:63: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1288:65: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1289:66: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1469:74: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1470:50: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1471:51: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1472:54: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1473:62: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1558:92: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1631:61: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_nl.c:605:95: sparse: attribute 'require_context': unknown attribute
--
+ drivers/block/drbd/drbd_int.h:50:10: sparse: preprocessor token __must_hold redefined
include/linux/compiler.h:13:10: this was the original definition
drivers/block/drbd/drbd_int.h:977:39: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1283:69: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1284:70: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1285:59: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1286:60: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1287:63: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1288:65: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1289:66: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1469:74: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1470:50: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1471:51: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1472:54: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1473:62: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1558:92: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1631:61: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_main.c:4014:60: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_main.c:4022:63: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_main.c:4038:62: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_main.c:4054:52: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_main.c:4071:56: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_main.c:4270:57: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_main.c:4278:59: sparse: attribute 'require_context': unknown attribute
--
+ drivers/block/drbd/drbd_int.h:50:10: sparse: preprocessor token __must_hold redefined
include/linux/compiler.h:13:10: this was the original definition
drivers/block/drbd/drbd_int.h:977:39: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1283:69: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1284:70: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1285:59: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1286:60: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1287:63: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1288:65: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1289:66: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1469:74: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1470:50: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1471:51: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1472:54: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1473:62: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1558:92: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1631:61: sparse: attribute 'require_context': unknown attribute
--
+ drivers/block/drbd/drbd_int.h:50:10: sparse: preprocessor token __must_hold redefined
include/linux/compiler.h:13:10: this was the original definition
drivers/block/drbd/drbd_int.h:977:39: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1283:69: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1284:70: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1285:59: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1286:60: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1287:63: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1288:65: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1289:66: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1469:74: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1470:50: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1471:51: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1472:54: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1473:62: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1558:92: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_int.h:1631:61: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_receiver.c:319:54: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_receiver.c:1062:81: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_receiver.c:1252:79: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_receiver.c:2171:56: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_receiver.c:2243:56: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_receiver.c:2292:56: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_receiver.c:2362:68: sparse: attribute 'require_context': unknown attribute
drivers/block/drbd/drbd_receiver.c:2546:76: sparse: attribute 'require_context': unknown attribute
vim +50 drivers/block/drbd/drbd_int.h
b411b363 Philipp Reisner 2009-09-25 34 #include <linux/slab.h>
b411b363 Philipp Reisner 2009-09-25 35 #include <linux/crypto.h>
132cc538 Randy Dunlap 2009-10-07 36 #include <linux/ratelimit.h>
b411b363 Philipp Reisner 2009-09-25 37 #include <linux/tcp.h>
b411b363 Philipp Reisner 2009-09-25 38 #include <linux/mutex.h>
b411b363 Philipp Reisner 2009-09-25 39 #include <linux/major.h>
b411b363 Philipp Reisner 2009-09-25 40 #include <linux/blkdev.h>
b411b363 Philipp Reisner 2009-09-25 41 #include <linux/genhd.h>
b411b363 Philipp Reisner 2009-09-25 42 #include <net/tcp.h>
b411b363 Philipp Reisner 2009-09-25 43 #include <linux/lru_cache.h>
70c71606 Paul Gortmaker 2011-05-22 44 #include <linux/prefetch.h>
b411b363 Philipp Reisner 2009-09-25 45
b411b363 Philipp Reisner 2009-09-25 46 #ifdef __CHECKER__
b411b363 Philipp Reisner 2009-09-25 47 # define __protected_by(x) __attribute__((require_context(x,1,999,"rdwr")))
b411b363 Philipp Reisner 2009-09-25 48 # define __protected_read_by(x) __attribute__((require_context(x,1,999,"read")))
b411b363 Philipp Reisner 2009-09-25 49 # define __protected_write_by(x) __attribute__((require_context(x,1,999,"write")))
b411b363 Philipp Reisner 2009-09-25 @50 # define __must_hold(x) __attribute__((context(x,1,1), require_context(x,1,999,"call")))
b411b363 Philipp Reisner 2009-09-25 51 #else
b411b363 Philipp Reisner 2009-09-25 52 # define __protected_by(x)
b411b363 Philipp Reisner 2009-09-25 53 # define __protected_read_by(x)
b411b363 Philipp Reisner 2009-09-25 54 # define __protected_write_by(x)
b411b363 Philipp Reisner 2009-09-25 55 # define __must_hold(x)
b411b363 Philipp Reisner 2009-09-25 56 #endif
b411b363 Philipp Reisner 2009-09-25 57
b411b363 Philipp Reisner 2009-09-25 58 #define __no_warn(lock, stmt) do { __acquire(lock); stmt; __release(lock); } while (0)
---
0-DAY kernel build testing backend Open Source Technology Center
Fengguang Wu, Yuanhan Liu Intel Corporation
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [next:akpm 86/86] drivers/block/drbd/drbd_int.h:50:10: sparse: preprocessor token __must_hold re
2012-10-12 16:41 [next:akpm 86/86] drivers/block/drbd/drbd_int.h:50:10: sparse: preprocessor token __must_hold redefi Fengguang Wu
@ 2012-10-12 19:10 ` Josh Triplett
0 siblings, 0 replies; 2+ messages in thread
From: Josh Triplett @ 2012-10-12 19:10 UTC (permalink / raw)
To: kernel-janitors
On Sat, Oct 13, 2012 at 12:41:56AM +0800, Fengguang Wu wrote:
> Hi Josh,
>
> FYI, there are new sparse warnings show up in
>
> tree: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git akpm
> head: 04b956faad392f46c9a234962a9990196b8e48fc
> commit: 04b956faad392f46c9a234962a9990196b8e48fc [86/86] linux/compiler.h: add __must_hold macro for functions called with a lock held
>
> + drivers/block/drbd/drbd_int.h:50:10: sparse: preprocessor token __must_hold redefined
> include/linux/compiler.h:13:10: this was the original definition
Interesting; looks like drbd wanted the same thing and defined it locally.
> drivers/block/drbd/drbd_int.h:977:39: sparse: attribute 'require_context': unknown attribute
These warnings occur because drbd tries to use Sparse features that
don't exist in a released version of Sparse. I'd say drbd needs some
fixing.
I'd propose dropping the DRBD __must_hold in favor of the
linux/compiler.h definition. If require_context goes into a released
version of Sparse, I can add it to the linux/compiler.h definition.
- Josh Triplett
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-10-12 19:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-12 16:41 [next:akpm 86/86] drivers/block/drbd/drbd_int.h:50:10: sparse: preprocessor token __must_hold redefi Fengguang Wu
2012-10-12 19:10 ` [next:akpm 86/86] drivers/block/drbd/drbd_int.h:50:10: sparse: preprocessor token __must_hold re Josh Triplett
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).