From: Fan Du Date: Fri, 10 Jan 2014 06:39:13 +0000 (+0800) Subject: {xfrm,pktgen} Fix compiling error when CONFIG_XFRM is not set X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6bae919003602729d6f5920315bf71ca78bd9e48;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git {xfrm,pktgen} Fix compiling error when CONFIG_XFRM is not set 0-DAY kernel build testing backend reported below error: All error/warnings: net/core/pktgen.c: In function 'pktgen_if_write': >> >> net/core/pktgen.c:1487:10: error: 'struct pktgen_dev' has no member named 'spi' >> >> net/core/pktgen.c:1488:43: error: 'struct pktgen_dev' has no member named 'spi' Fix this by encapuslating the code with CONFIG_XFRM. Cc: Fengguang Wu Signed-off-by: Fan Du Signed-off-by: Steffen Klassert --- diff --git a/net/core/pktgen.c b/net/core/pktgen.c index a37ec53c554c..fa3e128eb5e9 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c @@ -1482,7 +1482,7 @@ static ssize_t pktgen_if_write(struct file *file, sprintf(pg_result, "OK: flows=%u", pkt_dev->cflows); return count; } - +#ifdef CONFIG_XFRM if (!strcmp(name, "spi")) { len = num_arg(&user_buffer[i], 10, &value); if (len < 0) @@ -1493,7 +1493,7 @@ static ssize_t pktgen_if_write(struct file *file, sprintf(pg_result, "OK: spi=%u", pkt_dev->spi); return count; } - +#endif if (!strcmp(name, "flowlen")) { len = num_arg(&user_buffer[i], 10, &value); if (len < 0)