Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2921384rdb; Tue, 13 Feb 2024 00:58:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IHeJdkc1c0+7S34DbimDdYWUqgt4BsiQgHI9XW8ikNuRUEVJ0hBmuSgKAhlTMZIDQSH/oBl X-Received: by 2002:a05:622a:1899:b0:42c:7cba:a3d with SMTP id v25-20020a05622a189900b0042c7cba0a3dmr5543288qtc.28.1707814680957; Tue, 13 Feb 2024 00:58:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707814680; cv=pass; d=google.com; s=arc-20160816; b=stxfMfD4pOI8VXoa1ccxV26hV3N6NtuizmUMQJFz+MDo8r0rBdqQWRiWr02bMPkWeg iIuuU8WWzzbD9qDomTgIbK3exXGlkfONJxhZF3luVuKr98fmTJ3s6JsjrCjE5dfx6wDF lsaEIi6H6SyYmz+MO2cSmvwGUd4qn58vI+kwb8jWuaGoCWLu7HjeQ9fb3/E0lNDJOam4 EG9XdN2nBysXJMne1j4WvZ6sChHtDToZ6XHekT/nfIaypbKOys2twjuA4O7TXpNd5Fj+ uhFGC30kx7Zpz86NCu+bvuj5NYATm5EIc6mNJVRP3Cq5YFqWgoPOMrpOeYsnRZiucR8a vVHQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date; bh=/AXis1x02DunaDuh/jFC1of6g453jDX0l3sSH7EcNp4=; fh=3WpmEEtjGVJXpImIOFMIOH9QT3B++c959V48LfQwBSU=; b=KS2fFa/KES1jPK0zm7KBHACqP70y3d+2Nrl4rVvpFV0a2w8sa4J6Nlgm0HvK3nfyQ0 ARtsTq2hj4A4GFkM/ajacmUXTmuKyzXnYdVXgnbg2yVl3KZcmXDegNGua0SRQSqkMKhT nHTgl83vqKwMTF1bgxxSrvcerTPIii/aAEjray1cnmQuUyS4+fK6zd62jUSRmNXb/lnx /WlmF00CYItZaGLUoThntX/kKJl6Qm6ordlR//V++kUEkMu+r0GHv8m3WytlP96EWNGH fBXBfmP42+t1pfkGfxlQHEiv4dBi3b6b1fgENatsXCXB9oT6m2Q+VaqEgYx8sNfIO20Q nmEA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-63164-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63164-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com X-Forwarded-Encrypted: i=2; AJvYcCVkykpfupan3caVKhpsZFMsOwnoVpdlGkwnzEhp75az2eNlljSrjvcqsuFz/ykhmsYM7rWgnbounqXNmYQrr+BkhLWQTiXyYLEB//Tewg== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id l26-20020ac84a9a000000b0042c3ed94d8csi2168475qtq.392.2024.02.13.00.58.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 00:58:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-63164-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-63164-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63164-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com 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 B10B21C22C1A for ; Tue, 13 Feb 2024 08:58:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 06541224F2; Tue, 13 Feb 2024 08:57:25 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 55AE7224CF for ; Tue, 13 Feb 2024 08:57:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707814644; cv=none; b=E8eL61QTYtCMWTnoNknCR095HELp/0W2zoo+ZXT/9I77xMhdmgkLuwT2ZqHdjGG+E5MXc6P1tA/fVS2U0+LQ+UEOv8B7kSH7XdxE23XH/gcWuAMrGB3DyT13btFpBWIxYleq7MnC2G0axaez/Ai+aUoiVcBAFjQioyUvBtnayiU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707814644; c=relaxed/simple; bh=9lSW6m32627tKU44SqdR8PbYjOb+I7w9s6jJoZeehWw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=qAQbTAHzKexdMEdQA/CPb8LeZJfvLNLwXH0/2KJfukkuWQzLFp0HdAepPuUI559sFEVp3WNnZbr2p2fkNMOEaAC0zjJEKe7TcI2EMktPkcuMtBtf9xHoA50GCGjqlYQ2ts1y23j/kZ8nbXIBxv6ImqAput5maxDBRCl7YgeGcVo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 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 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240211-bus_cleanup-firmware2-v1-1-1851c92c7be7@marliere.net> 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 >