Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753150AbdGYVNS (ORCPT ); Tue, 25 Jul 2017 17:13:18 -0400 Received: from mga14.intel.com ([192.55.52.115]:62381 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751952AbdGYVNG (ORCPT ); Tue, 25 Jul 2017 17:13:06 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,412,1496127600"; d="scan'208";a="291390250" From: Vikas Shivappa To: vikas.shivappa@intel.com Cc: vikas.shivappa@linux.intel.com, x86@kernel.org, linux-kernel@vger.kernel.org, hpa@zytor.com, tglx@linutronix.de, peterz@infradead.org, ravi.v.shankar@intel.com, tony.luck@intel.com, fenghua.yu@intel.com, eranian@google.com, davidcc@google.com, ak@linux.intel.com, reinette.chatre@intel.com Subject: [PATCH 07/28] x86/intel_rdt: make rdt_resources_all more readable Date: Tue, 25 Jul 2017 14:14:26 -0700 Message-Id: <1501017287-28083-8-git-send-email-vikas.shivappa@linux.intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1501017287-28083-1-git-send-email-vikas.shivappa@linux.intel.com> References: <1501017287-28083-1-git-send-email-vikas.shivappa@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1707 Lines: 62 Change the format of the global rdt_resources_all. This holds all the RDT resource structure initialization values. Make this more readable by using the format: rdt_resources_all[] = { [] = {... } ... } Signed-off-by: Vikas Shivappa --- arch/x86/kernel/cpu/intel_rdt.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/x86/kernel/cpu/intel_rdt.c b/arch/x86/kernel/cpu/intel_rdt.c index 835e1ff..98715c5 100644 --- a/arch/x86/kernel/cpu/intel_rdt.c +++ b/arch/x86/kernel/cpu/intel_rdt.c @@ -63,6 +63,7 @@ #define domain_init(id) LIST_HEAD_INIT(rdt_resources_all[id].domains) struct rdt_resource rdt_resources_all[] = { + [RDT_RESOURCE_L3] = { .name = "L3", .domains = domain_init(RDT_RESOURCE_L3), @@ -77,6 +78,7 @@ struct rdt_resource rdt_resources_all[] = { .parse_ctrlval = parse_cbm, .format_str = "%d=%0*x", }, + [RDT_RESOURCE_L3DATA] = { .name = "L3DATA", .domains = domain_init(RDT_RESOURCE_L3DATA), @@ -91,6 +93,7 @@ struct rdt_resource rdt_resources_all[] = { .parse_ctrlval = parse_cbm, .format_str = "%d=%0*x", }, + [RDT_RESOURCE_L3CODE] = { .name = "L3CODE", .domains = domain_init(RDT_RESOURCE_L3CODE), @@ -105,6 +108,7 @@ struct rdt_resource rdt_resources_all[] = { .parse_ctrlval = parse_cbm, .format_str = "%d=%0*x", }, + [RDT_RESOURCE_L2] = { .name = "L2", .domains = domain_init(RDT_RESOURCE_L2), @@ -119,6 +123,7 @@ struct rdt_resource rdt_resources_all[] = { .parse_ctrlval = parse_cbm, .format_str = "%d=%0*x", }, + [RDT_RESOURCE_MBA] = { .name = "MB", .domains = domain_init(RDT_RESOURCE_MBA), -- 1.9.1