Received: by 2002:a05:7412:8598:b0:f9:33c2:5753 with SMTP id n24csp538054rdh; Tue, 19 Dec 2023 06:32:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IFuqzeR5I1xIi9mBls9hk+bEp2eEO0Th/AsqpRqv1YmaohKlFWYpQ7umYouNf+hZQ8zl5xl X-Received: by 2002:a50:a6d6:0:b0:553:81d3:f1eb with SMTP id f22-20020a50a6d6000000b0055381d3f1ebmr850021edc.70.1702996361592; Tue, 19 Dec 2023 06:32:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702996361; cv=none; d=google.com; s=arc-20160816; b=IWhJJM6b1Uz/b1kmcTIg86lXg0peSjufIIiHmHEyUkY0uB+xDv82eEmxi3wjf/0ZXs pP4VKTgBlGnm5bFcFPhJYM5T9PonCrG8p8jMivnoGIev0sq/gT4R7+hxWw5wFxMl0k9z Y1NBDQFYr8wFavU1Ku5pthlGzv0WcisHXu2DiWeoTEndQ2u3ZGtVaxdQB+M7+iQSdBQZ cwBWdAoi/68yx/m4oGavLOJI6FP6lGeqq6mH5blKXfgeSPYTaBb3mvK4WPTaUo7YgsTD RUM20YhrmqkFEuk2iOPOadKKnvIWr32KePDQMlRc8Y4JEtcoQRGzVIpk3LjIErz+uZ7Z PykA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=LgWAqgmcmIgjfBwBoxwD6QJsU44nJlXzIz90Fcdcb6g=; fh=mpG8O92UTdnjk/MMHXx+DOXrRsIuHBhi3bWH+VgPhkM=; b=yifAkknRIDrZGyA6YaTQHLWeB+Fu33QYgWf6qZfPRSqWXl7ul237gyc9R2CYBbZXK9 +F3fle7WVxBBdJKIGY40zTMw4VRmG9WT2Q3UET9HGzuD/NAZn4vPkKzu98oPaAvlg2t0 YgKeIzTDlPAeWVY7HbTo/4vLJmVxalA57hc9JZoreoArrXGWJ7/mCJuofzC+cwlelaYH hO6SJuZWbKl7jEdx1jBGTbPn/QICCPQpfUQhOjEs6Lf/vH5kOLTxahgZQXd00j8LmQSx vuJIikk70GmH10UsklJRQh/Q3K8wlGbR+ZlCLB/t+pI+o2U98pCcHUQVQzRRJwkq2MoG RH2Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-5372-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5372-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id t18-20020a508d52000000b0055214ee0ac2si5987054edt.250.2023.12.19.06.32.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 06:32:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5372-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-5372-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5372-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 028E91F22587 for ; Tue, 19 Dec 2023 14:32:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B10FF1BDD8; Tue, 19 Dec 2023 14:27:56 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5DBEB1B29C for ; Tue, 19 Dec 2023 14:27:54 +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 179AC1FB; Tue, 19 Dec 2023 06:28:38 -0800 (PST) Received: from [10.57.85.119] (unknown [10.57.85.119]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D88D63F5A1; Tue, 19 Dec 2023 06:27:52 -0800 (PST) Message-ID: Date: Tue, 19 Dec 2023 14:27:52 +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] dma-debug: make dma_debug_add_bus take a const pointer Content-Language: en-GB To: Greg Kroah-Hartman , hch@lst.de, m.szyprowski@samsung.com Cc: linux-kernel@vger.kernel.org, iommu@lists.linux.dev References: <2023121941-dejected-nugget-681e@gregkh> From: Robin Murphy In-Reply-To: <2023121941-dejected-nugget-681e@gregkh> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2023-12-19 1:41 pm, Greg Kroah-Hartman wrote: > The driver core now can handle a const struct bus_type pointer, and the > dma_debug_add_bus() call just passes on the pointer give to it to the > driver core, so make this pointer const as well to allow everyone to use > read-only struct bus_type pointers going forward. Reviewed-by: Robin Murphy > Cc: Christoph Hellwig > Cc: Marek Szyprowski > Cc: Robin Murphy > Cc: iommu@lists.linux.dev > Signed-off-by: Greg Kroah-Hartman > --- > include/linux/dma-map-ops.h | 4 ++-- > kernel/dma/debug.c | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/include/linux/dma-map-ops.h b/include/linux/dma-map-ops.h > index f2fc203fb8a1..e401f824a007 100644 > --- a/include/linux/dma-map-ops.h > +++ b/include/linux/dma-map-ops.h > @@ -443,10 +443,10 @@ static inline void arch_teardown_dma_ops(struct device *dev) > #endif /* CONFIG_ARCH_HAS_TEARDOWN_DMA_OPS */ > > #ifdef CONFIG_DMA_API_DEBUG > -void dma_debug_add_bus(struct bus_type *bus); > +void dma_debug_add_bus(const struct bus_type *bus); > void debug_dma_dump_mappings(struct device *dev); > #else > -static inline void dma_debug_add_bus(struct bus_type *bus) > +static inline void dma_debug_add_bus(const struct bus_type *bus) > { > } > static inline void debug_dma_dump_mappings(struct device *dev) > diff --git a/kernel/dma/debug.c b/kernel/dma/debug.c > index 3de494375b7b..1a5c86dd87d5 100644 > --- a/kernel/dma/debug.c > +++ b/kernel/dma/debug.c > @@ -876,7 +876,7 @@ static int dma_debug_device_change(struct notifier_block *nb, unsigned long acti > return 0; > } > > -void dma_debug_add_bus(struct bus_type *bus) > +void dma_debug_add_bus(const struct bus_type *bus) > { > struct notifier_block *nb; >