mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Clark <james.clark@arm.com>
To: coresight@lists.linaro.org, suzuki.poulose@arm.com
Cc: James Clark <james.clark@arm.com>,
	Mike Leach <mike.leach@linaro.org>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	linux-stm32@st-md-mailman.stormreply.com
Subject: [PATCH v2 09/12] coresight: Add explicit member initializers to coresight_dev_type
Date: Mon, 29 Jan 2024 15:40:40 +0000	[thread overview]
Message-ID: <20240129154050.569566-10-james.clark@arm.com> (raw)
In-Reply-To: <20240129154050.569566-1-james.clark@arm.com>

These could potentially become wrong silently if the enum is changed,
so explicitly initialize them.

Signed-off-by: James Clark <james.clark@arm.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


  parent reply	other threads:[~2024-01-29 15:42 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-29 15:40 [PATCH v2 00/12] coresight: Separate sysfs and Perf usage and some other cleanups James Clark
2024-01-29 15:40 ` [PATCH v2 01/12] coresight: Fix issue where a source device's helpers aren't disabled James Clark
2024-01-29 15:40 ` [PATCH v2 02/12] coresight: Make language around "activated" sinks consistent James Clark
2024-01-29 15:40 ` [PATCH v2 03/12] coresight: Remove ops callback checks James Clark
2024-01-29 15:40 ` [PATCH v2 04/12] coresight: Move mode to struct coresight_device James Clark
2024-01-29 15:40 ` [PATCH v2 05/12] coresight: Remove the 'enable' field James Clark
2024-01-29 15:40 ` [PATCH v2 06/12] coresight: Move all sysfs code to sysfs file James Clark
2024-01-29 15:40 ` [PATCH v2 07/12] coresight: Remove atomic type from refcnt James Clark
2024-01-29 15:40 ` [PATCH v2 08/12] coresight: Remove unused stubs James Clark
2024-01-29 15:40 ` James Clark [this message]
2024-01-29 15:40 ` [PATCH v2 10/12] coresight: Add helper for atomically taking the device James Clark
2024-01-29 15:40 ` [PATCH v2 11/12] coresight: Add a helper for getting csdev->mode James Clark
2024-01-29 15:40 ` [PATCH v2 12/12] coresight: Add helper for setting csdev->mode James Clark
2024-02-12 11:27 ` [PATCH v2 00/12] coresight: Separate sysfs and Perf usage and some other cleanups Suzuki K Poulose

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240129154050.569566-10-james.clark@arm.com \
    --to=james.clark@arm.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=coresight@lists.linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=mike.leach@linaro.org \
    --cc=suzuki.poulose@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®