Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp109683rdb; Fri, 5 Jan 2024 04:33:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IF1SWv1zd9twGdqyzDV/cVyQpkqVpqfBGutV2q3guvRgeZGIun6Xdf7+oaT+c1ugUyS/guN X-Received: by 2002:ae9:e71a:0:b0:781:ee6:6316 with SMTP id m26-20020ae9e71a000000b007810ee66316mr1964600qka.153.1704458023908; Fri, 05 Jan 2024 04:33:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704458023; cv=none; d=google.com; s=arc-20160816; b=ciyiafhSXWXscWvWSk0XFNNLb7OhXvuLagem0mK6nlDoGjXaJYQ9lVZFjpUmD+xVFb vjVU40rqXnpC31dPVPuz9PNFlLxDQkLuaNXfCvw4xrjX2FTnK1O455ooIe6DQDUa2WuE g74BkpgqA6t4XSYl0O70RVkycQrw4g5YbnQwZ+3g/wuyDInEadp05NFgJlf/jKlNZZOt pOvip+/TN1bJoLoBWg75oiM5DtqT2MwAaIzl/IBfhkHASoQJY2dlkXom94MBD0Vq77Vi BSDobkX2l93mSMXTUozByHCainsLbxo6h7GnlyKsAnMoXacUy3eue15ioPyQipHWYPDN vLBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:lines:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=ZjRWT2DI8vGkPYbQrvBWB+cjIDt1hc8Jp1Jt+w+pbsY=; fh=TvkxjC+L7Jwn6f1lKNjkHAv80WBjATGt7ioyQlljCk4=; b=Oc+LI7B1wJhRikjQ5oXsdE0oDY18Kb4YKrzNjooyDpzcD6efdJSn0BUPunqTHj6Fc3 iKH7lCOG8OTH1LMSAeMk1HzwmBs1enXaO5MuNcVGoJY/baVIlELoUVQQrwR6tfg04qvl QdMrTOHOUzrxGMeZgzVm46RkpARzzwEKzZcwow54zUEj9asCDGLKIxEPPYCXKsRkT1w2 S+ZGPjLVc8qnkT1PImn2pcvRobeiQOTu1raOOiNuf1rIcEygpjw53zj4d9/fqE9OIYQ2 meoBB7mV08ReUNhALYppm/mrk0s0ylsV0wpktQjUNn2kDgs5sV5zU8jKCl0gEbtjyolL L5rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=CTf4U0Qp; spf=pass (google.com: domain of linux-kernel+bounces-17832-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17832-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id f6-20020a05620a280600b0077fbe2de1bbsi1693484qkp.518.2024.01.05.04.33.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 04:33:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-17832-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=CTf4U0Qp; spf=pass (google.com: domain of linux-kernel+bounces-17832-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17832-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 79FC01C22E78 for ; Fri, 5 Jan 2024 12:33:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1833C2D615; Fri, 5 Jan 2024 12:33:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="CTf4U0Qp" X-Original-To: linux-kernel@vger.kernel.org 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) 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 Lines: 45 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: 8bit 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, -- 2.43.0