From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2CD4F2D7A7 for ; Fri, 5 Jan 2024 14:22:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com 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 B6E0BC15; Fri, 5 Jan 2024 06:23:32 -0800 (PST) Received: from [10.57.44.155] (unknown [10.57.44.155]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 482333F7A6; Fri, 5 Jan 2024 06:22:45 -0800 (PST) Message-ID: Date: Fri, 5 Jan 2024 14:22:43 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] coresight: make coresight_bustype const Content-Language: en-GB To: Greg Kroah-Hartman , coresight@lists.linaro.org Cc: linux-kernel@vger.kernel.org, Mike Leach , James Clark , Leo Yan , Alexander Shishkin , linux-arm-kernel@lists.infradead.org References: <2024010531-tinfoil-avert-4a57@gregkh> From: Suzuki K Poulose In-Reply-To: <2024010531-tinfoil-avert-4a57@gregkh> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 05/01/2024 12:33, Greg Kroah-Hartman wrote: > 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; Thanks, for the patch. I will queue this for v6.8. Thanks Suzuki > > enum coresight_dev_type { > CORESIGHT_DEV_TYPE_SINK,