linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* cannot size expression - exported array in kernel
@ 2011-11-21 10:06 Johannes Berg
  2011-11-24  7:29 ` Pekka Enberg
  0 siblings, 1 reply; 3+ messages in thread
From: Johannes Berg @ 2011-11-21 10:06 UTC (permalink / raw)
  To: linux-sparse

Here's some code from net/wireless/util.c, expressed as a test case. I
have no idea how to fix it. The actual output is:

+sizeof-external.c:11:16: error: cannot size expression

while none is expected.

johannes

/***** begin file validation/sizeof-external.c **** */
/* #include file that declares it */
extern const unsigned char bridge_tunnel_header[6];

/* define it */
const unsigned char bridge_tunnel_header[] = { 1, 2, 3, 4, 5, 6 };
/* EXPORT_SYMBOL it */
extern typeof(bridge_tunnel_header) bridge_tunnel_header; /* ... */

static int bth_size(void)
{
	return sizeof(bridge_tunnel_header);
}

/*
 * check-name: Check sizeof(kernel_exported_external_variable)
 *
 * check-error-start
 * check-error-end
 */



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

end of thread, other threads:[~2011-11-24  7:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-21 10:06 cannot size expression - exported array in kernel Johannes Berg
2011-11-24  7:29 ` Pekka Enberg
2011-11-24  7:53   ` Christopher Li

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).