From patchwork Fri Jan 5 12:33:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 13512030 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 101F4C3DA6E for ; Fri, 5 Jan 2024 12:34:22 +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: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:In-Reply-To:References: List-Owner; bh=xpmqfqef9xqbNbPyVBu2oqaCOgX3nt/9Y7Y03+PzAaY=; b=lQGwjhjrfEnPCc 3XHsXNgV+yY5HYC+b892MKIprWrJWYbPVW31LbKmTjS3mlwA6i/ZJLOrNHZuwmhS6mU7nIXifIS0k e6XNveDvbK6uN0nNUvNVtsEsXQsbG/seq4tJDcpxZDiAWkqzpDNSNf+0WKMNH/aM9Q5yrz/EV8znB w+0TYSSb7fQZe/7Ngr7aVfsovk2eWIA6Q9TDLLXNB1iIHoeAYlFWVrUyVsV+2Toa8S+glkxXyhlWI +a7BbuNhchTG0K58wzhB5OXZ+8m8hFlXRi7jS5jLv7PNZmxtjyJH1Crr0VxJ4zGig5Ri78d3P7TbA ZvR1CAaPK9/NvrcPsXFg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rLjOZ-00Gqos-2C; Fri, 05 Jan 2024 12:33:51 +0000 Received: from sin.source.kernel.org ([2604:1380:40e1:4800::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rLjOW-00Gqmv-0b for linux-arm-kernel@lists.infradead.org; Fri, 05 Jan 2024 12:33:49 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id C53E0CE1E73; Fri, 5 Jan 2024 12:33:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2BE7DC433C7; Fri, 5 Jan 2024 12:33:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1704458016; bh=Tyh7Z/guTSNA99TOFNxVkN5Bd/C6PszkdiWF0BBoAEA=; h=From:To:Cc:Subject:Date:From; b=CTf4U0QpP32A3rDra6b0HkUE0k4EoPr1rDFnEFRVYD5psD31yheYu2gfdHrPsicSu RnDjeBbaUsmWcxMGAd/1CXmW0to/3nF88dk1gzpCY/Y4f/hnY5KrHdLPXUfv3DQDKX gGbQl9L+xm38tIw1TUFA/70OxFA8aCfT2HxklFmE= From: Greg Kroah-Hartman To: coresight@lists.linaro.org Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Suzuki K Poulose , Mike Leach , James Clark , Leo Yan , Alexander Shishkin , linux-arm-kernel@lists.infradead.org Subject: [PATCH] coresight: make coresight_bustype const Date: Fri, 5 Jan 2024 13:33:32 +0100 Message-ID: <2024010531-tinfoil-avert-4a57@gregkh> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1664; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Tyh7Z/guTSNA99TOFNxVkN5Bd/C6PszkdiWF0BBoAEA=; b=owGbwMvMwCRo6H6F97bub03G02pJDKnTv0vrHt6h7lFywvcia+X1LYL2J1OZI543dq+9IcGin RB3Q+B/RywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEzksAbDgn3FYtYusywm7Yhw va6/sMv5p+bnOIYF16NW9tdJK3FlOyWK/09RSJzBZaABAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240105_043348_394770_67D81BC9 X-CRM114-Status: GOOD ( 12.34 ) 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 Now that the driver core can properly handle constant struct bus_type, move the coresight_bustype variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: Suzuki K Poulose Cc: Mike Leach Cc: James Clark Cc: Leo Yan Cc: Alexander Shishkin Cc: coresight@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Greg Kroah-Hartman --- drivers/hwtracing/coresight/coresight-core.c | 2 +- include/linux/coresight.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-core.c b/drivers/hwtracing/coresight/coresight-core.c index 9fabe00a40d6..24c49e581737 100644 --- a/drivers/hwtracing/coresight/coresight-core.c +++ b/drivers/hwtracing/coresight/coresight-core.c @@ -1796,7 +1796,7 @@ char *coresight_alloc_device_name(struct coresight_dev_list *dict, } EXPORT_SYMBOL_GPL(coresight_alloc_device_name); -struct bus_type coresight_bustype = { +const struct bus_type coresight_bustype = { .name = "coresight", }; diff --git a/include/linux/coresight.h b/include/linux/coresight.h index a269fffaf991..8fe75a0d7693 100644 --- a/include/linux/coresight.h +++ b/include/linux/coresight.h @@ -35,7 +35,7 @@ #define CORESIGHT_UNLOCK 0xc5acce55 -extern struct bus_type coresight_bustype; +extern const struct bus_type coresight_bustype; enum coresight_dev_type { CORESIGHT_DEV_TYPE_SINK,