From nobody Fri Dec 26 11:18:58 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 170D72D602 for ; Fri, 5 Jan 2024 12:33:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="CTf4U0Qp" 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 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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/hwtraci= ng/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_de= v_list *dict, } EXPORT_SYMBOL_GPL(coresight_alloc_device_name); =20 -struct bus_type coresight_bustype =3D { +const struct bus_type coresight_bustype =3D { .name =3D "coresight", }; =20 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 @@ =20 #define CORESIGHT_UNLOCK 0xc5acce55 =20 -extern struct bus_type coresight_bustype; +extern const struct bus_type coresight_bustype; =20 enum coresight_dev_type { CORESIGHT_DEV_TYPE_SINK, --=20 2.43.0