[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1224074238.3984.169.camel@achroite>
Date: Wed, 15 Oct 2008 13:37:18 +0100
From: Ben Hutchings <bhutchings@...arflare.com>
To: Steven Whitehouse <swhiteho@...hat.com>
Cc: davem@...hat.com, netdev@...r.kernel.org,
Christine Caulfield <ccaulfie@...hat.com>
Subject: Re: decnet: Fix complier warning
On Wed, 2008-10-15 at 13:19 +0100, Steven Whitehouse wrote:
> This patch fixes a warning seen during compiling dn_dev.c. The warning is harmless
> since we know that the structure length in question is less than 2^32 bytes, but
> this fixes it anyway.
>
> Signed-off-by: Steven Whitehouse <swhiteho@...hat.com>
> Cc: Christine Caulfield <ccaulfie@...hat.com>
>
> diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c
> index 2f0ac3c..d9bc69c 100644
> --- a/net/decnet/dn_dev.c
> +++ b/net/decnet/dn_dev.c
> @@ -152,7 +152,7 @@ static struct dn_dev_parms dn_dev_list[] = {
>
> #define DN_DEV_LIST_SIZE ARRAY_SIZE(dn_dev_list)
>
> -#define DN_DEV_PARMS_OFFSET(x) ((int) ((char *) &((struct dn_dev_parms *)0)->x))
> +#define DN_DEV_PARMS_OFFSET(x) ((long) ((char *) &((struct dn_dev_parms *)0)->x))
>
> #ifdef CONFIG_SYSCTL
>
Or you could make this use offsetof(). Daring, I know, it's only been a
standard macro for nearly 20 years.
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists