From mboxrd@z Thu Jan 1 00:00:00 1970 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 9BDC7C4829A for ; Tue, 13 Feb 2024 08:57:38 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1CisIrH6KLwhiw56YNdY8xkoqway3SLy5PfIuCvrkTM=; b=GMXx4gC/29cC9Z moMSGTOf4F+KnAWbi032mI5+BMaEK/ZddljAsI4b7IChAsGmmHDIvsd4Qez4VlMWhKqSeqnwmOmha zt+W0MP4niI4C2oJrLzeDlediJFhRH+jddbeBD/uQiiLW+3EFZq4CJ1vApvuV4frPUOTsfupd2Fcd h3+gdpQucsgxvt1PQDP+KaA3s+we1LZxsW9uChiQciHbGZAG2OoaU9RmQ6FAyjPsc5x5c7+sOK8KN LflS+cXc9nepteuZpXX/ebOKW09Is2iOADFD6OQgEODq7KuadG5CWyOB8Y84DSolNDXUkRT4Jw/Vl VuwEy1TicEY3DVWC6BfQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rZobV-00000008WMQ-0Rmy; Tue, 13 Feb 2024 08:57:25 +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 1rZobS-00000008WKz-2xDx for linux-arm-kernel@lists.infradead.org; Tue, 13 Feb 2024 08:57:24 +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 CCE01DA7; Tue, 13 Feb 2024 00:58:02 -0800 (PST) Received: from pluto (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CE2BC3F5A1; Tue, 13 Feb 2024 00:57:20 -0800 (PST) Date: Tue, 13 Feb 2024 08:57:18 +0000 From: Cristian Marussi To: "Ricardo B. Marliere" Cc: Sudeep Holla , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman Subject: Re: [PATCH 1/2] firmware: arm_ffa: Make ffa_bus_type const Message-ID: References: <20240211-bus_cleanup-firmware2-v1-0-1851c92c7be7@marliere.net> <20240211-bus_cleanup-firmware2-v1-1-1851c92c7be7@marliere.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240211-bus_cleanup-firmware2-v1-1-1851c92c7be7@marliere.net> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240213_005722_881475_4E4077BB X-CRM114-Status: GOOD ( 16.63 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sun, Feb 11, 2024 at 12:51:29PM -0300, Ricardo B. Marliere wrote: > Now that the driver core can properly handle constant struct bus_type, > move the ffa_bus_type variable to be a constant structure as well, > placing it into read-only memory which can not be modified at runtime. > > Cc: Greg Kroah-Hartman > Suggested-by: Greg Kroah-Hartman > Signed-off-by: Ricardo B. Marliere Reviewed-by: Cristian Marussi Thanks, Cristian > --- > drivers/firmware/arm_ffa/bus.c | 2 +- > include/linux/arm_ffa.h | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/firmware/arm_ffa/bus.c b/drivers/firmware/arm_ffa/bus.c > index 1c7940ba5539..2f557e90f2eb 100644 > --- a/drivers/firmware/arm_ffa/bus.c > +++ b/drivers/firmware/arm_ffa/bus.c > @@ -105,7 +105,7 @@ static struct attribute *ffa_device_attributes_attrs[] = { > }; > ATTRIBUTE_GROUPS(ffa_device_attributes); > > -struct bus_type ffa_bus_type = { > +const struct bus_type ffa_bus_type = { > .name = "arm_ffa", > .match = ffa_device_match, > .probe = ffa_device_probe, > diff --git a/include/linux/arm_ffa.h b/include/linux/arm_ffa.h > index 3d0fde57ba90..c906f666ff5d 100644 > --- a/include/linux/arm_ffa.h > +++ b/include/linux/arm_ffa.h > @@ -209,7 +209,7 @@ bool ffa_device_is_valid(struct ffa_device *ffa_dev) { return false; } > #define module_ffa_driver(__ffa_driver) \ > module_driver(__ffa_driver, ffa_register, ffa_unregister) > > -extern struct bus_type ffa_bus_type; > +extern const struct bus_type ffa_bus_type; > > /* FFA transport related */ > struct ffa_partition_info { > > -- > 2.43.0 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel