[tip:x86/cpu] x86/intel_rdt: Get rid of anon union

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit-ID:  a83827d04f081b1a73845553c7f60ab9cfd13767
Gitweb:     http://git.kernel.org/tip/a83827d04f081b1a73845553c7f60ab9cfd13767
Author:     Thomas Gleixner <tglx@xxxxxxxxxxxxx>
AuthorDate: Mon, 17 Apr 2017 09:57:10 +0200
Committer:  Thomas Gleixner <tglx@xxxxxxxxxxxxx>
CommitDate: Mon, 17 Apr 2017 10:16:23 +0200

x86/intel_rdt: Get rid of anon union

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@xxxxxxxxx>
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
---
 arch/x86/include/asm/intel_rdt.h | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/x86/include/asm/intel_rdt.h b/arch/x86/include/asm/intel_rdt.h
index bd184e1..597dc49 100644
--- a/arch/x86/include/asm/intel_rdt.h
+++ b/arch/x86/include/asm/intel_rdt.h
@@ -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;
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux