[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240129154050.569566-10-james.clark@arm.com>
Date: Mon, 29 Jan 2024 15:40:40 +0000
From: James Clark <james.clark@....com>
To: coresight@...ts.linaro.org,
suzuki.poulose@....com
Cc: James Clark <james.clark@....com>,
Mike Leach <mike.leach@...aro.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org,
linux-stm32@...md-mailman.stormreply.com
Subject: [PATCH v2 09/12] coresight: Add explicit member initializers to coresight_dev_type
These could potentially become wrong silently if the enum is changed,
so explicitly initialize them.
Signed-off-by: James Clark <james.clark@....com>
---
drivers/hwtracing/coresight/coresight-sysfs.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/hwtracing/coresight/coresight-sysfs.c b/drivers/hwtracing/coresight/coresight-sysfs.c
index 5992f2c2200a..fa52297c73d2 100644
--- a/drivers/hwtracing/coresight/coresight-sysfs.c
+++ b/drivers/hwtracing/coresight/coresight-sysfs.c
@@ -378,22 +378,22 @@ static struct attribute *coresight_source_attrs[] = {
ATTRIBUTE_GROUPS(coresight_source);
struct device_type coresight_dev_type[] = {
- {
+ [CORESIGHT_DEV_TYPE_SINK] = {
.name = "sink",
.groups = coresight_sink_groups,
},
- {
+ [CORESIGHT_DEV_TYPE_LINK] = {
.name = "link",
},
- {
+ [CORESIGHT_DEV_TYPE_LINKSINK] = {
.name = "linksink",
.groups = coresight_sink_groups,
},
- {
+ [CORESIGHT_DEV_TYPE_SOURCE] = {
.name = "source",
.groups = coresight_source_groups,
},
- {
+ [CORESIGHT_DEV_TYPE_HELPER] = {
.name = "helper",
}
};
--
2.34.1
Powered by blists - more mailing lists