From: David S. Miller Date: Wed, 15 Oct 2008 22:59:50 +0000 (-0700) Subject: decnet: Fix compiler warning in dn_dev.c X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8fa0b315fc0c1a414da1371f1fc39523a657c192;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git decnet: Fix compiler warning in dn_dev.c Use offsetof() instead of home-brewed version. Based upon initial patch by Steven Whitehouse and suggestions by Ben Hutchings. Signed-off-by: David S. Miller --- diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c index 2f0ac3c3eb71..ba352588e344 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) offsetof(struct dn_dev_parms, x) #ifdef CONFIG_SYSCTL