x86/intel_rdt: Get rid of anon union
authorThomas Gleixner <tglx@linutronix.de>
Mon, 17 Apr 2017 07:57:10 +0000 (09:57 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 17 Apr 2017 08:16:23 +0000 (10:16 +0200)
gcc-4.4.3 fails to statically initialize members of a anon union.
See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10676

The storage saving is not really worth it and aside of that it will catch
usage of the cache member for bandwidth and vice versa easier.

Fixes: 05b93417ce5b ("x86/intel_rdt/mba: Add primary support for Memory Bandwidth Allocation (MBA)")
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/include/asm/intel_rdt.h

index bd184e1fd207b7c639159e1d8fc884c2dd416dfb..597dc4995678b2ec82bd6e370fa13afcb8611e5c 100644 (file)
@@ -167,10 +167,8 @@ struct rdt_resource {
                                 struct rdt_resource *r);
        int                     data_width;
        struct list_head        domains;
-       union {
-               struct rdt_cache        cache;
-               struct rdt_membw        membw;
-       };
+       struct rdt_cache        cache;
+       struct rdt_membw        membw;
        struct rftype           *info_files;
        int                     nr_info_files;
        const char              *format_str;