Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2926446rdb; Tue, 13 Feb 2024 01:07:57 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXt3tHNiPhOn+UnnEgVj+rWN2lSwhQnhHbAyZlXWf7VWVBHcS7fQAWRT6KLjwRnq29bGsx5byXyFk7Gk6DWXAUvDBClWqQAdYR21aRHqg== X-Google-Smtp-Source: AGHT+IGBqHGLKKn8xmX1/F6DHcyJppiuU82zODuTmCUfCOi+GmcJPZnktAC8Kj71XPS4C0D6OoHs X-Received: by 2002:a17:902:b907:b0:1d9:8f7:dd26 with SMTP id bf7-20020a170902b90700b001d908f7dd26mr9410629plb.5.1707815277579; Tue, 13 Feb 2024 01:07:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707815277; cv=pass; d=google.com; s=arc-20160816; b=Z+dvBhSb4lbptQ1VXNoy4C9G2K3OKAL1NUxo+RwhD+grbD/vdpRtKfzBsr4Ms5eltj t8ATGRThdGwvjZRTopatb8bsDL9zcVHLLgY/V5QhslwUA6O6oedoyUch/x6PFGJKJysz PzMZ9xerYxq6o/fd7y4GZPEOd/hLXc8I+qvDnS1vwNurldP2I4F/MBZ6AlLX6EwimPIN /HwFvPbZdpBvAcyHetU8PJHv9Oc7J1TFe9bf3yfo+5MUS0tJy2LGGtyIGwWt4BL8VYo3 uhFP34uVfVjXAk16WrQ9eCz0aHDYPy1e7uxQhAJti23s6fYLh02aIGoSSJcWniA2rUtD q44Q== 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=1J1j2DNOxtQ8P0NdNxzlUX5ZJNeQZFm4Q+MYHdzTITU=; fh=QaPRBdnSNxrizh1qWt27kbxCNs7VW77UPYyL60ObJxc=; b=ksTDRbrm8mA8ZNL6SskAnr1fGkFrqxmu8b8oryAj+mZabPsY87ndyIp60xF2ThGtRQ ck9+NfHe8Le62kYmuuZPKBJvtxB7/nWUt3BGOq2cKvrtNCxQ3/Kc94oN7ske/ra9Covc f9taYSRXmIIPqLkKKvoWsWt9kOBH7MP4icNT0FubtV6zpBHvUwwxVaU+ZDq5Sj585hUe e3BiMeJba1mim8vVL2MkzqCOJyf5XQ180+WrEmgvVHgYNmcfPAD9ACMJtQrW3aBzwBjV 0hCGZduAZrMZhs0qbicp3ZGtrGU37StSlFWstZDuAKaJfOJz8nTJN8309ASjiV3fKuRv hnYg==; 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-63167-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63167-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; AJvYcCV+Dv39zIUV2f/xp3t6kSYQBijGLfCPnfFGKGqG9tm3/+lE+KkrGkOfXtPkK1Dpn038c84QkhW4eJ/CjeWnGjzNWttzPZPLNUDgn35ggw== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id lk7-20020a17090308c700b001da2a3e4c55si1735666plb.216.2024.02.13.01.07.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 01:07:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-63167-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; 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-63167-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63167-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 1895EB23623 for ; Tue, 13 Feb 2024 08:58:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CE6AE24B23; Tue, 13 Feb 2024 08:57:58 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 61CFD24A05 for ; Tue, 13 Feb 2024 08:57:56 +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=1707814678; cv=none; b=Zh0k8U2CH4s15p6HnkTNRawgnk/yBYj5J7GwgDwDGvvYrtjUG3NcApg1xkwSqCI68SYdZ8/ny/tWeICsfa3iidHFzs7yyl+vXX2U87uO0UegVFZBDbrB3gQpbKH8Bd7hDeJ12PqsXLiub2ahG7OBiuQ4lUNqnTBAvVc8CMRMSVY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707814678; c=relaxed/simple; bh=iNVTWSqqtJ40f8xe/FSZ5vrQlRsZU23LeuGKqtME110=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Cp5k6dJpddKP+U5jlt1IgOFfTNvJVe7FjU1k2TYUvLXuYOOyHuY2T2OTQG4hqhOmQfBiXppNaiAAB5Oq7JB8QqUHqTKPI5HNkm+664nTYUaY4k1svoi7gOs13o6vPdojHr32Qn0ZpbwrTrdX/IbdRHndWWPRMU5JyuCmGbaTPVs= 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 BD445DA7; Tue, 13 Feb 2024 00:58:36 -0800 (PST) Received: from pluto (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BF7503F5A1; Tue, 13 Feb 2024 00:57:54 -0800 (PST) Date: Tue, 13 Feb 2024 08:57:52 +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 2/2] firmware: arm_scmi: make scmi_bus_type const Message-ID: References: <20240211-bus_cleanup-firmware2-v1-0-1851c92c7be7@marliere.net> <20240211-bus_cleanup-firmware2-v1-2-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-2-1851c92c7be7@marliere.net> On Sun, Feb 11, 2024 at 12:51:30PM -0300, Ricardo B. Marliere wrote: > Now that the driver core can properly handle constant struct bus_type, > move the scmi_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_scmi/bus.c | 2 +- > drivers/firmware/arm_scmi/common.h | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/firmware/arm_scmi/bus.c b/drivers/firmware/arm_scmi/bus.c > index c15928b8c5cc..609a6496c1d4 100644 > --- a/drivers/firmware/arm_scmi/bus.c > +++ b/drivers/firmware/arm_scmi/bus.c > @@ -263,7 +263,7 @@ static void scmi_dev_remove(struct device *dev) > scmi_drv->remove(scmi_dev); > } > > -struct bus_type scmi_bus_type = { > +const struct bus_type scmi_bus_type = { > .name = "scmi_protocol", > .match = scmi_dev_match, > .probe = scmi_dev_probe, > diff --git a/drivers/firmware/arm_scmi/common.h b/drivers/firmware/arm_scmi/common.h > index 00b165d1f502..6affbfdd1dec 100644 > --- a/drivers/firmware/arm_scmi/common.h > +++ b/drivers/firmware/arm_scmi/common.h > @@ -141,7 +141,7 @@ scmi_revision_area_get(const struct scmi_protocol_handle *ph); > void scmi_setup_protocol_implemented(const struct scmi_protocol_handle *ph, > u8 *prot_imp); > > -extern struct bus_type scmi_bus_type; > +extern const struct bus_type scmi_bus_type; > > #define SCMI_BUS_NOTIFY_DEVICE_REQUEST 0 > #define SCMI_BUS_NOTIFY_DEVICE_UNREQUEST 1 > > -- > 2.43.0 >