All of lore.kernel.org
 help / color / mirror / Atom feed
* sparse: new feature " multiple initializers" has false positives on MODULE_ALIAS
@ 2015-01-22 20:31 Christian Borntraeger
  2015-01-23 16:40 ` Christopher Li
  0 siblings, 1 reply; 20+ messages in thread
From: Christian Borntraeger @ 2015-01-22 20:31 UTC (permalink / raw)
  To: Linus Torvalds, Christopher Li; +Cc: Jason J. Herne, linux-sparse

Linus, Christopher,

Commit  0f25c6a78e08fdc15af5e599d836fa24349c042f ("Add warning about duplicate initializers") has a false positive on arch/s390/kvm/kvm-s390.c

  CHECK   arch/s390/kvm/kvm-s390.c
arch/s390/kvm/kvm-s390.c:1823:1: error: symbol '__UNIQUE_ID_alias__COUNTER__' has multiple initializers (originally initialized at arch/s390/kvm/kvm-s390.c:1822)

1822: MODULE_ALIAS_MISCDEV(KVM_MINOR);
1823: MODULE_ALIAS("devname:kvm");


Preprocessing with gcc gives
static const char __UNIQUE_ID_alias0[] __attribute__((__used__)) __attribute__((section(".modinfo"), unused, aligned(1))) = "alias" "=" "char-major-" "10" "-" "232";
static const char __UNIQUE_ID_alias1[] __attribute__((__used__)) __attribute__((section(".modinfo"), unused, aligned(1))) = "alias" "=" "devname:kvm";

so alias0 and alias1 instead of __COUNTER__.
I never heard of __COUNTER__ before, so I guess its some gcc magic that sparse should mimic..

Christian


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2015-02-12 20:16 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-22 20:31 sparse: new feature " multiple initializers" has false positives on MODULE_ALIAS Christian Borntraeger
2015-01-23 16:40 ` Christopher Li
2015-01-23 22:23   ` [PATCH] Teach sparse about the __COUNTER__ predefined macro Luc Van Oostenryck
2015-01-23 22:28     ` Sam Ravnborg
2015-01-23 22:38     ` josh
2015-01-23 23:59       ` Luc Van Oostenryck
2015-01-24  1:29         ` Josh Triplett
2015-01-24 11:27           ` Luc Van Oostenryck
2015-01-24 20:19             ` Josh Triplett
2015-01-24 20:39               ` Luc Van Oostenryck
2015-01-25 20:12         ` Christian Borntraeger
2015-01-28 10:08           ` Christian Borntraeger
2015-02-02  5:17         ` Christopher Li
2015-02-04  2:38           ` Luc Van Oostenryck
2015-02-12 20:16             ` Christopher Li
2015-02-04  2:46           ` [PATCH 1/3] test-suite: add support for tests case involving several input files Luc Van Oostenryck
2015-02-06 15:02             ` Christopher Li
2015-02-04  2:49           ` [PATCH 2/3] test-suite: allow filename expansion of the input sections Luc Van Oostenryck
2015-02-04  2:51           ` [PATCH 3/3] test-suite: consolidate tests that require include files into single test files Luc Van Oostenryck
2015-02-04  3:11           ` [PATCH 2/3] test-suite: allow filename expansion of the input sections Luc Van Oostenryck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.