From patchwork Mon Jan 29 15:40:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Clark X-Patchwork-Id: 13535904 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 607D0C48285 for ; Mon, 29 Jan 2024 15:43:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=J7+eQHy7DKx9Z4jjxQnCfZ7vADtv7nqXIdTaroCGKOM=; b=nEvjdD+Dry+4uw 6xBiI9/ekq6K20mz1YOIc9QsYkW+sGWhy12ny+BaiVG/iQOqwjt9ACGF/gkbzTxhPSkQxrH9bgnRd uRQeWFLi9uhQy1K8rNYEzv+69g/MNJa3Rz57TYX+XL2qDWSn26nWGNTgTO2g3J7nJt4GzZujUQl2C NifQfdeVR4TbUSNkr5AeQLHxHv3hL3j4a0r7/jABozJ//umiuzSfDoevWr5lm3/Xy6A58cJE0EKU0 AKs9icTn0sTrTU1whCp0VmBywh9A0YHlgl8Ii5uwRzrkQHZPzK/kzhmaj4ogFlt2D3fo7CNIQWFiP kCbqdNIqO0bjVHqdF+Dw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rUTme-0000000DLGu-1FlM; Mon, 29 Jan 2024 15:42:52 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rUTmI-0000000DL4r-0Da0 for linux-arm-kernel@lists.infradead.org; Mon, 29 Jan 2024 15:42:33 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 10D0EDA7; Mon, 29 Jan 2024 07:43:13 -0800 (PST) Received: from e127643.lan (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id A493A3F738; Mon, 29 Jan 2024 07:42:26 -0800 (PST) From: James Clark To: coresight@lists.linaro.org, suzuki.poulose@arm.com Cc: James Clark , Mike Leach , Alexander Shishkin , Maxime Coquelin , Alexandre Torgue , 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 Message-Id: <20240129154050.569566-10-james.clark@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240129154050.569566-1-james.clark@arm.com> References: <20240129154050.569566-1-james.clark@arm.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240129_074230_368947_53F424F4 X-CRM114-Status: GOOD ( 10.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org These could potentially become wrong silently if the enum is changed, so explicitly initialize them. Signed-off-by: James Clark --- 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", } };